Remove dropdown selector from MIT jQuery clock -


i found jquery clock online (it's brilliant, should grab it!) i'd display time without having select dropdown (see example at: http://www.robertmeans.com/clock ). know absolutely nothing jquery. how might go modifying clock displays time without having make selection? i'd able put whatever utc offset want , make clock print time.

<html>   <head>   <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js</script>   <script type="text/javascript" src="scripts/jclock.js"></script>   <link rel="stylesheet" href="css/homepage.css" />   <script type="text/javascript">     $(document).ready(     function() {        $("#zones_australia").change(function(){        if ($('#time-cont .time').length>0){ $('#time-cont .time').remove();}    var offset = $(this).val();            if (offset == '') return;            $('#time-cont').append('<div class="time"></div>');         var options = {         format:'<span class=\"dt\">%a, %d %b %h:%m:%s</span>',         timenotation: '12h',         am_pm: true,         utc:true,         utc_offset: offset       }        $('#time-cont .time').jclock(options);    });  }); </script>    </head>   <body>    <select id="zones_australia">     <option value="">--select--</option>     <option value="-7">us pacific</option>   </select>   </body> </html> 

i think should work:

     $(document).ready(         function() {             if ($('#time-cont .time').length>0){ $('#time-cont .time').remove();} //set offset here        var offset = -7;                if (offset == '') return;                $('#time-cont').append('<div class="time"></div>');             var options = {             format:'<span class=\"dt\">%a, %d %b %h:%m:%s</span>',             timenotation: '12h',             am_pm: true,             utc:true,             utc_offset: offset           }            $('#time-cont .time').jclock(options);      }); 

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -