jQuery addClass() not running before jQuery.ajax()
- by Josh
I'm trying to have a button that onclick will apply a class loading (sets cursor to "wait") to the body, before making a series of ajax requests.
Code is:
$('#addSelected').click(function(){
$('body').addClass('loading');
var products = $(':checkbox[id^=add_]:checked');
products.each(function(){
var prodID =…