how to load content in a dynamic created div with ajax on a click
<p>This my current code:</p>

<pre><code>var container, url;

$(".nav-list li a").on("click", function(e) {

   e.preventDefault();

   var $url = this.href + " #content";
   var container = $("#content");

   $(".nav li").removeClass("active");
   $(this).parent().addClass("active");

   $(this).addClass("clicked");

   var $row = $(".span10");
   var $rowNew = $('.new');

   if ($rowNew.children().length &gt; 1) {
        $(".span10 div").removeClass("new");
        $('&lt;div class="row-fluid new"&gt;&lt;/div&gt;').prependTo($row);
   }

   if ($(".new").length == 0) {
        $('&lt;div class="row-fluid new"&gt;&lt;/div&gt;').prependTo($row);
        $('&lt;div class="span6"&gt;' + container.load(url) + '&lt;/div&gt;').appendTo('.new');
   } else {
        $('&lt;div class="span6"&gt;' + container.load(url) + '&lt;/div&gt;').appendTo('.new');
   }

});
</code></pre>

<p>I am trying to load content inside <code>&lt;div class="span6"&gt;</code>HERE<code>&lt;/div&gt;</code> but I am getting confused on how to set the .load and load the content in it. </p>

<p>Current html output:</p>

<pre><code>&lt;div class="row-fluid new"&gt;
   &lt;div class="span6"&gt;
       container.load(url)
   &lt;/div&gt;
&lt;/div&gt;
</code></pre>
