Sequence of running code in jQuery
<p>This is a part of my code:</p>

<pre><code>$.post('category.php',{datatosend : datatosend},result);

function result(data) {
    $('#placeHolder').append('&lt;select onchange="loadcats();" id="categoryPID" name="categoryPID" &gt;').append(data).append('&lt;/select&gt;');  
    alert($('#placeHolder').html());
    });
}
</code></pre>

<p>and I want to have this HTML in alert:</p>

<pre><code>&lt;select onchange="loadcats();" id="categoryPID" name="categoryPID"&gt;
&lt;option value="37"&gt;computer&lt;/option&gt;&lt;option value="38"&gt;mobile&lt;/option&gt;
&lt;/select&gt;
</code></pre>

<p>but the result is:</p>

<pre><code>&lt;select onchange="loadcats();" id="categoryPID" name="categoryPID"&gt;&lt;/select&gt;
&lt;option value="37"&gt;computer&lt;/option&gt;&lt;option value="38"&gt;mobile&lt;/option&gt;
</code></pre>

<p>why and what should I do?! Thanks.</p>
