Disable clicking on any elements by using CSS and Jquery

There is a tip in CSS that you can use to disable click on any elements. Here is how to use it with jQuery:

CSS:

.dis{pointer-events:none}

Jquery:

$("#container").addClass("dis"); //disables

$("#container").removeClass("dis"); //enables

Hope it is useful for you 🙂

Revisions

No comments yet.

Leave a Reply