Repeating same java menu twice on one web page
<p>If you use a menu similar to that found on jqueryui.com, how would you go about repeating this menu 2, 3, 4, times as necessary on the same page? I know that if I were to simply copy and paste the entire block, the second menu would not be able to access the .js file.</p>

<p>I've been trying to look at using .clone and appendTo, but I'm not sure if this is the right direction.</p>

<p>TIA...</p>

<p>This code is not mine but is a good example of what I'm looking at:</p>

<pre><code>&lt;head&gt;
&lt;meta charset="utf-8"&gt;
&lt;title&gt;accordion demo&lt;/title&gt;
&lt;link rel="stylesheet" href="http://code.jquery.com/ui/1.9.0/themes/base/jquery-ui.css"&gt;
&lt;script src="http://code.jquery.com/jquery-1.8.2.js"&gt;&lt;/script&gt;
&lt;script src="http://code.jquery.com/ui/1.9.0/jquery-ui.js"&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;

&lt;div id="accordion"&gt;
&lt;h3&gt;Section 1&lt;/h3&gt;
&lt;div&gt;
    &lt;p&gt;Mauris mauris ante, blandit et, ultrices a, suscipit eget.
    Integer ut neque. Vivamus nisi metus, molestie vel, gravida in,
    condimentum sit amet, nunc. Nam a nibh. Donec suscipit eros.
    Nam mi. Proin viverra leo ut odio.&lt;/p&gt;
&lt;/div&gt;
&lt;h3&gt;Section 2&lt;/h3&gt;
&lt;div&gt;
    &lt;p&gt;Sed non urna. Phasellus eu ligula. Vestibulum sit amet purus.
    Vivamus hendrerit, dolor aliquet laoreet, mauris turpis velit,
    faucibus interdum tellus libero ac justo.&lt;/p&gt;
&lt;/div&gt;
&lt;h3&gt;Section 3&lt;/h3&gt;
&lt;div&gt;
    &lt;p&gt;Nam enim risus, molestie et, porta ac, aliquam ac, risus.
    Quisque lobortis.Phasellus pellentesque purus in massa.&lt;/p&gt;
    &lt;ul&gt;
        &lt;li&gt;List item one&lt;/li&gt;
        &lt;li&gt;List item two&lt;/li&gt;
        &lt;li&gt;List item three&lt;/li&gt;
    &lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;

&lt;script&gt;
$( "#accordion" ).accordion();
&lt;/script&gt;

&lt;/body&gt;
</code></pre>
