Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Go to the following URL:</p> <p><a href="http://www.scottklarr.com/files/binary-clock/clock.htm" rel="nofollow noreferrer">http://www.scottklarr.com/files/binary-clock/clock.htm</a></p> <p>and view the source.</p> <p><strong>Here is a breakdown:</strong></p> <p>This code sets up jQuery and the plugin: </p> <pre><code>&lt;head&gt; &lt;link href="binary-clock.css" rel="stylesheet" type="text/css" /&gt; &lt;script type="text/javascript" src="jquery.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="binary-clock.js"&gt;&lt;/script&gt; &lt;/head&gt; </code></pre> <p>It also references a style sheet, which can be downloaded from <a href="http://www.scottklarr.com/files/binary-clock/clock.css" rel="nofollow noreferrer">http://www.scottklarr.com/files/binary-clock/clock.css</a></p> <p>This code:</p> <pre><code>&lt;div id="binaryClock"&gt; &lt;div id="bcHa"&gt; &lt;img src="led0.png" alt="" id="bcHa1" /&gt; &lt;img src="led0.png" alt="" id="bcHa2" /&gt; &lt;/div&gt; &lt;div id="bcHb" class="edge"&gt; &lt;img src="led0.png" alt="" id="bcHb1" /&gt; &lt;img src="led0.png" alt="" id="bcHb2" /&gt; &lt;img src="led0.png" alt="" id="bcHb4" /&gt; &lt;img src="led0.png" alt="" id="bcHb8" /&gt; &lt;/div&gt; &lt;div id="bcMa"&gt; &lt;img src="led0.png" alt="" id="bcMa1" /&gt; &lt;img src="led0.png" alt="" id="bcMa2" /&gt; &lt;img src="led0.png" alt="" id="bcMa4" /&gt; &lt;/div&gt; &lt;div id="bcMb" class="edge"&gt; &lt;img src="led0.png" alt="" id="bcMb1" /&gt; &lt;img src="led0.png" alt="" id="bcMb2" /&gt; &lt;img src="led0.png" alt="" id="bcMb4" /&gt; &lt;img src="led0.png" alt="" id="bcMb8" /&gt; &lt;/div&gt; &lt;div id="bcSa"&gt; &lt;img src="led0.png" alt="" id="bcSa1" /&gt; &lt;img src="led0.png" alt="" id="bcSa2" /&gt; &lt;img src="led0.png" alt="" id="bcSa4" /&gt; &lt;/div&gt; &lt;div id="bcSb"&gt; &lt;img src="led0.png" alt="" id="bcSb1" /&gt; &lt;img src="led0.png" alt="" id="bcSb2" /&gt; &lt;img src="led0.png" alt="" id="bcSb4" /&gt; &lt;img src="led0.png" alt="" id="bcSb8" /&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>...is where the actual clock is referenced on the page. It contains div references for all of the image files that comprise the dot elements of the clock. It also contains some CSS class references, so some styling is taking place.</p> <p>This code:</p> <pre><code>&lt;script type="text/javascript"&gt; $(document).ready(function() { updateBinaryClock(); }); &lt;/script&gt; </code></pre> <p>...waits for the page to fully load in the browser, and then kickstarts the clock plugin.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload