Javascript Cancel bubbling event


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



Copy this code and paste it in your HTML
  1. function cancelBubbling(e){
  2. if(!e) e = window.event;
  3. e.cancelBubble = true;
  4. if(e.stopPropagation) e.stopPropagation();
  5. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.