Stop Event Propagations


/ Published in: jQuery

see http://www.undolog.com/2009/08/21/impedire-la-propagazione-degli-eventi-con-jquery/ for detail


Copy this code and paste it in your HTML
  1. $('a#mylink').click(
  2. function(event) {
  3. document.location = event.target.href;
  4. event.stopPropagation();
  5. event.preventDefault();
  6. }
  7. );

URL: http://www.undolog.com/2009/08/21/impedire-la-propagazione-degli-eventi-con-jquery/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.