How can I select with jQuery elements that have been included using Javascript?
<p>So I have a menu that gets added using this function:</p>

<pre><code>function loadContent() { 
    $(".navbar").load("navigation.html"); 
} 
</code></pre>

<p>navigation.html looks like this:</p>

<pre><code>&lt;ul&gt;
    &lt;li&gt;&lt;a href="home.html" class="first"&gt;Home&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="calendar.html"&gt;Calendar&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="profile.html"&gt;Profile&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="charts.html" class="last"&gt;Energy Charts&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>but when I try to select something in that menu and add a class, let's say:</p>

<pre><code>$('.navbar a').addClass('activeState');
</code></pre>

<p>it doesn't work in Chrome, I think because the DOM needs to be refreshed or something, I really don't know...</p>
