I've to manipulate the interaction with an element in runtime, making it invisible and "no interactible".. The rule that can accomplish the second, is "pointer-events: none"
The problem is that it doesn't recognized from JS or jQuery... why?
I 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
"0" is no valid value for pointer-events. Set it to none instead..css({pointer-events:"0"}) is not valid syntax because you can't have a - in a property without quoting it, like .css({"pointer-events":"0"}) But since you probably don't want to quote every property just to make it consistent with the ones that require quoting because of dashes, you can instead use camelCased properties which jQuery considers equivalent: .css({pointerEvents:"0"}) Or you can use their alternate syntax which only uses strings: .css("pointer-events", "0")
pointer-eventsare not natively supported on any version of IE