jQuery selector not working on callback function
<p>I have my code like this</p>

<pre><code>$.post('JSP/Commands/Search.jsp', $("#search_field").serialize(),
      function(id) {
         $('#div_to_load').load('JSP/Details.jsp');
         $("#headCollapsed_" + id).trigger('click');
      });
</code></pre>

<p>I have checked that the function is returning the correct id response, however <code>$("#headCollapsed_" + id)</code> is not being selected. When i check</p>

<pre><code>alert( $("#headCollapsed_" + id).length &gt; 0 );
</code></pre>

<p>returns <code>true</code>. The div is however present when i'm viewing it in my browser. </p>

<p>Clicking on the element should <code>slideToggle()</code> another div which is already present on the DOM as well.</p>

<p>What could be wrong with this?</p>
