I've to manipulate the interaction with an element in runtime, making it invisible and "no interactible".. The rule that can acplish the second, is "pointer-events: none"
The problem is that it doesn't recognized from JS or jQuery... why?
I've to manipulate the interaction with an element in runtime, making it invisible and "no interactible".. The rule that can acplish the second, is "pointer-events: none"
The problem is that it doesn't recognized from JS or jQuery... why?
Share Improve this question asked Mar 8, 2013 at 13:46 SoniaSonia 2531 gold badge3 silver badges17 bronze badges 1-
Which browser do you need this work work on?
pointer-events
are not natively supported on any version of IE – andyb Commented Mar 8, 2013 at 13:53
2 Answers
Reset to default 21I don't think I understand the question, but (using jQuery)
$( document.body ).css( 'pointer-events', 'none' );
will work just fine for supporting browsers (ignoring any pointer event). However, if you remove / hide the element, pointer events will of course also no longer work if you hide it by
display: none
You can use the css pointer-events: none;
to allow events to go through. Also, like 1j01 mented, jquery will accept camelCase to get around the problem of dashes in the name:
$('.my-class').css({pointerEvents: "none"})