Integrating a third-party library into Lightning Components

In this section, we will take a third-party JavaScript library, flipclock.js (http://FlipClock.js.com/), and build a Lightning Component that displays a clock and can be used as a timer.

The example that we will be using to build a Lightning Component is shown in the following code snippet: 

<html>  <head>    <link rel="stylesheet" href="../compiled/flipclock.css">    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>    <script src="../compiled/flipclock.js"></script>   </head>  <body>    <div class="clock" style="margin:2em;"></div>    <script type="text/javascript">      var clock;      $(document).ready(function() {        clock = $('.clock').FlipClock({ clockFace: 'TwentyFourHourClock' ...

Get Learning Salesforce Lightning Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.