I need to perform an action after a jQuery .load call, currently this is my code:
function ajax_autopaginate(a, b) {
function incrementPage () {
next_page += 1;
next_previews += 32;
}
jQuery('#' + b).load( a , incrementPage)
}
but I need to run incrementPage function only when .load is completed, how can I do this?
you do it with the ‘complete’ callback, like so:
(tho the only problem i see in your snippet is the missing semicolon after the
loaddeclaration).