I have div that goes in to an edit mode... the div contains buttons, links++. In edit mode i want to disable all of these, and enable them when i exit edit mode.
Ive tried
$("#container").children().disableSelection();
but it does not work :-(
To disable a link using CSS, pointer-events property can be used, which sets whether the element in the page has to respond or not while clicking on elements. The pointer-events property is used to specify whether element show to pointer events and whether not show on the pointer.
To disable a HTML anchor element with CSS, we can apply the pointer-events: none style. pointer-events: none will disable all click events on the anchor element.
Nope! Divs can't be disabled. Only form and form elems.
To disable div element and everything inside with CSS, we set the pointer-events CSS property of the div to none . to disable pointer events on the div with pointer-events set to none with CSS.
Edit mode enter:
$("#container").children().bind('click', function(){ return false; });
Edit mode exit:
$("#container").children().unbind('click');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With