CSS property that can be used:
pointer-events:none
! IMPORTANT Please note that this property is not supported by Opera Mini and IE 10 and below (inclusive). For these browsers, a different solution is needed.
JQuery METHOD If you want to disable it using a script rather than CSS properties, they can help you: If you are using jQuery version 1.4. 3+:
$('selector').click(false);
If not:
$('selector').click(function(){return false;});
- Link from: jquery - disable click
You can re-enable clicks with pointer-events: auto; ( Documentation )
. Note that pointer-events overrides the cursor property, so if you want the cursor to be different from the standard
, your CSS should be in place after pointer-events .
Aviad
source share