/ Published in: jQuery
                    
                                        
I found this really useful when using AJAX that will change database. Preventing the user to re-do the action is not the best way but it still is a little unobtrusive to the user as it lets him navigate the page and know what is going on.
                
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
$('html').ajaxStart(function(){
$(this).addClass('wait').bind('click',function(){
return false;
});
}).ajaxStop(function(){
$(this).removeClass('wait').unbind('click');
});
//On the CSS
html.wait, html.wait * {cursor:wait;}
Comments
 Subscribe to comments
                    Subscribe to comments
                
                