Hi want to disable all onclick events on a page i write this:
window.onclick = anyfunction;
document.onclick=anyfunction;
function anyfunction() {};
That's work but if page contain this code
$("body").click(function () {
anyfunctions();
});
It will run. even i add
document.body.onclick
Jquery code runs again. I want to disable all onclick functions (java script and jquery and ... ) with javascript without using jquery library
Target is to block popup windows Thanks
This css may help you in a better way.
call this function where ever and whenever you would like to stop the click events on your page. This will work.
you could also try
also see - How to prevent onclick statements from being executed?
and - Prevent onclick action with jQuery