Revision: 29790
Updated Code
at August 4, 2010 22:08 by verhaeg
Updated Code
$('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;}
Revision: 29789
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at August 4, 2010 22:06 by verhaeg
Initial Code
$('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;}
Initial URL
Initial Description
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.
Initial Title
Change cursor and prevent click on AJAX request
Initial Tags
ajax, javascript, jquery
Initial Language
jQuery