jquery - live and delegate failed here
<p>The following codes worked before but would not work again except I put alert after the ajax call, I've use both delegate &amp; live but it didn't work still.</p>

<pre><code>function getAns(val) {
var value;
value = $("input[name=ans"+val+"]:checked").val();
$.post('ajax.php', {val:value}, function(data) {
    alert(data);
});
//only works with this alert
alert('done'); 
});
</code></pre>

<p>}</p>
