How to disable clicking inside div

The CSS property that can be used is:

pointer-events:none

!IMPORTANT
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.

jQuery METHOD
If you want to disable it via script and not CSS property, these can help you out:
If you’re using jQuery versions 1.4.3+:

$('selector').click(false);

If not:

$('selector').click(function(){return false;});
  • Referenced 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 something other than the standard cursor, your css should be place after pointer-events.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)