Disable click using the CSS method
The CSS property is:
Note: You can use
!important to override with any default pointer events.
Keep in mind that this property is not supported by Opera Mini and IE 10 and below (inclusive). Another solution is needed for these browsers.
Please visit Can I Use to see the browser’s support.
You can also disable a click inside a specific DIV or Section using the
document.getElementById('id').style.pointerEvents = 'none';
The jQuery method
If you want to disable it via jQuery and not from the CSS property, please use the following code:
It is tested with jQuery versions 1.4.3+
Another jQuery method to disable click event is below: