jquery - queue event until ajax call finishes
<p>im working with rails and jquery here. </p>

<p>When the email field loses focus (blur), i call server to verify if it is valid (email format and unique). If it is valid, i update a hidden input value to true and false if it is not valid.</p>

<p>Then user clicks (focus) on another email field, if the first email is invalid (hidden input false) i disable this field and send some alert message.</p>

<p>My problem is, user types an email on the first email field, it is a valid email so on blur i update the hidden field but if the user clicks on the second email field just after typing the first email, the focus event on the second field is triggered before the hidden input gets updated and the second email field is disabled wrongly.</p>

<p>basically i need to queue the focus event until the ajax call is finished</p>

<p>Sorry its a little confusing to explain, if someone understand what i said, is there a workaround?</p>
