How can I add a jQuery event when my content is loaded dynamically?
<p>I have the following:</p>

<pre><code>$("#menu, #home")
    .on('click', 'a[href^="/C"], a[href^="/City"], 
       function (event) {
</code></pre>

<p>However the contents of #menu are dynamically loaded. </p>

<pre><code>&lt;div id="cityList" class="columns menu-list"&gt;
   &lt;ul id="menu" class="controls-buttons question-grid"&gt;
      &lt;li&gt; &lt;/li&gt;
      ......
      ......
</code></pre>

<p>How can I make it so the above jQuery works even if the #menu contents are not there yet?</p>
