Note that there are some explanatory texts on larger screens.

plurals
  1. PORemove dropdown selector from MIT jQuery clock
    text
    copied!<p>I found a jQuery clock online (it's brilliant, you should grab it!) but I'd like to display the time without having to select from a dropdown (see example at: <a href="http://www.robertmeans.com/clock" rel="nofollow">http://www.robertmeans.com/clock</a> ). I know absolutely nothing about jQuery. How might I go about modifying this clock so that it just displays the time without having to make a selection? I'd like to be able to put whatever UTC offset I want and make the clock print that time.</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js&lt;/script&gt; &lt;script type="text/javascript" src="scripts/jclock.js"&gt;&lt;/script&gt; &lt;link rel="stylesheet" href="css/homepage.css" /&gt; &lt;script type="text/javascript"&gt; $(document).ready( function() { $("#zones_Australia").change(function(){ if ($('#time-cont .time').length&gt;0){ $('#time-cont .time').remove();} var offset = $(this).val(); if (offset == '') return; $('#time-cont').append('&lt;div class="time"&gt;&lt;/div&gt;'); var options = { format:'&lt;span class=\"dt\"&gt;%a, %d %b %H:%M:%S&lt;/span&gt;', timeNotation: '12h', am_pm: true, utc:true, utc_offset: offset } $('#time-cont .time').jclock(options); }); }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;select id="zones_Australia"&gt; &lt;option value=""&gt;--Select--&lt;/option&gt; &lt;option value="-7"&gt;US Pacific&lt;/option&gt; &lt;/select&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
 

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