javascript - Run function when another function finishes jQuery -


when page done refreshing, jquery event launched:

$(#id).trigger('reloaded'); 

'reloaded' custom event;

how set listener , such that, when done 'reloading' , run function:

i thinking this:

$(#id).on('reloaded',function(ev) {     alert("launch function"); }); 

but doesnt work

you missing quote in alert()

it should this:

$('#id').on('reloaded',function(ev){             alert("launch function");              }); 

edit: quotes in selector @pinocchio


Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -