Reputation: 1149
When a page is done refreshing, jQuery event is launched:
$(#id).trigger('reloaded');
'reloaded' is a custom event;
How do i set up a listener , such that, when it is done 'reloading' , i run another function:
I was thinking about this:
$(#id).on('reloaded',function(ev) {
alert("LAUNCH function");
});
But this doesnt work
Upvotes: 0
Views: 158
Reputation: 1328
You are missing a quote in your alert()
it should look like this:
$('#id').on('reloaded',function(ev){
alert("LAUNCH function");
});
EDIT: quotes in the selector thanks to @Pinocchio
Upvotes: 1