Javascript Add Div on the fly which ul list link is clicked
<p>I am trying to replace having to create a sub list and instead I want to add the div's via javascript / jquery.</p>

<p>Here is what I have:</p>

<pre><code>&lt;script&gt;
function makepage() {
var myvariable1="myTitle";
var newPage = $("&lt;div&gt;'+myvariable1+'&lt;/div");
//appendTo here?
&lt;/script&gt;

...
</code></pre>

<p>Then the list:</p>

<pre><code>&lt;ul&gt;
&lt;li&gt;
&lt;a href="#" id="myid" onclick="makepage();"&gt;Click Here&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>The reason code creating it dynamically is that I want to pass some variables to it internally and I don't want to use a form / post etc...</p>

<p>How can I make newPage appear when I click myid link?</p>
