Using custom events for binding the same functionality for multiple pieces of code


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. $("div").bind("remove.pluginA", someFn);
  2. $("div").bind("remove.pluginB", otherFn);
  3. $("div").trigger("remove");
  4.  

Report this snippet


Comments


You need to login to view comments.