Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>To your question: '<em>is it OK to have multiple HTML pages embedded within one another?</em>', the answer is: no, you can't have multiple <code>html</code> tags inside one document, it would be an invalid document.</p> <p>Assuming <code>jclock.js</code> is properly coded, it should be able to drive multiple instances.</p> <p>Then you would add some extra container <code>div</code>'s in the HTML and modify your JavaScript code a little (peek in the other versions you have) to set extra clocks with their own options.</p> <p>You could change your code to this (and re-factor it once it works to your liking):</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"&gt;&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() { var options; // This way you can re-use it without the 'var' keyword. // Timezone 1 if ($('#us_pacific .time').length&gt;0){ $('#us_pacific .time').remove(); } $('#us_pacific').append('&lt;div class="time"&gt;&lt;/div&gt;'); options = { format: '&lt;span class=\"dt\"&gt;%a, %d %b %H:%M&lt;/span&gt;', timeNotation: '12h', am_pm: true, utc: true, utc_offset: -7 // Now set the offset here }; $('#us_pacific .time').jclock(options); //Timezone 2 if ($('#eu .time').length&gt;0){ $('#eu .time').remove(); } $('#eu').append('&lt;div class="time"&gt;&lt;/div&gt;'); options = { format: '&lt;span class=\"dt\"&gt;%a, %d %b %H:%M&lt;/span&gt;', timeNotation: '12h', am_pm: true, utc: true, utc_offset: 1 // Now set the offset here }; $('#eu .time').jclock(options); }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="us_pacific"&gt;&lt;/div&gt; &lt;div id="eu"&gt;&lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>I hope this helps!</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