wait for jquery operation to finish before starting new one on focus/blur function
<p>When clicking out of an input field, I'm executing some jquery. If I click in and out really quickly it screws everything up. How can I let the current operation finish before starting a new one?</p>

<pre><code>$("#title, #desc").focus(function() {

}).blur(function() {

    var frameHtml = $('.liveDemoFrame').html();
    var liveDemoFrame = $('.liveDemoFrame');
    var previewFrame = $('#previewFrame');

    previewFrame.remove();
    liveDemoFrame.append(frameHtml).hide();
    $('#previewFrame').hide();
    liveDemoFrame.show().append('&lt;p id="loading"&gt;Loading...&lt;/p&gt;');

    setTimeout(function() { 
        $('#loading').remove();
        $('#previewFrame').fadeIn();
    }, 1000);

});
</code></pre>
