Why might you use custom events instead of shared helper functions? For example
$(document).on('myCustomEvent', function(){
// act on my custom event
});
//and later...
$(document).trigger('myCustomEvent');
Why might you use custom events instead of shared helper functions? For example
$(document).on('myCustomEvent', function(){
// act on my custom event
});
//and later...
$(document).trigger('myCustomEvent');