I disable propagation of clicks.
$(document).ready(function () {
$('#user-wrapper .dropdown-menu').click(function (e) {
e.stopPropagation();
});
});
How can I enable it again?
Let's say I'd like to have 2 functions: stopPropagation() and enablePropagation()
Once propagation has been stopped, it cannot be resumed. As a workaround, what you can do is set a variable, and then only stop if this variable is true:
var stop = false;
// do your logic here
if(stop){
event.stopPropagation();
}
Or you may try this in another way
$('#some_link').click(function(event){
event.preventDefault();
});
$('#some_link').unbind('click'); //worked as the only method to restore the default action.
Your call!
Hope it helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With