Click here to Skip to main content
15,901,426 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
JavaScript
$('html').on('mousedown', function(e){
       e.stopImmediatePropagation();
   });



if i have tag inside of html element, i have to remove stopImmediatePropagation() for
tag.

What I have tried:

$('html').on('mousedown', function(e){
e.stopImmediatePropagation();
});
Posted
Updated 12-Jul-16 4:37am

1 solution

Hi, please try the below code :

// If you have class for your tags
$('html').not('.tag_class_name').on('mousedown', function(e){
    e.stopImmediatePropagation();
})​;

// If you have id for your tags
$('html').not('#tag_id_1, #tag_id_2, #tag_id_3').on('mousedown', function(e){
    e.stopImmediatePropagation();
})​
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900