2

I am trying to disable click on a two div elements until another div has loaded completely. Once its loaded I am removing the pointer-events: none to it.

For this am adding a class which has as follows:

.someclass {
    pointer-events: none
} 

initially in the CSS , and then removing that using jQuery "removeClass" method once the other div/DOM is loaded.

I tried using bind and unbind events and also .on() and .off() but they weren't of any help.

Is there any alternative to this in jQuery or Javascript to disable click events on div's initially and enable once the DOM has loaded completely ?

  • Using `pointer-events: auto` should active the clicks again if thats the question here. – Raymond Nijland Aug 30 '18 at 11:12
  • 1
    No, pointer-events: none doesn't seem to work on Safari v7, hence am looking for an alternative in js or jQuery – Mohammed Junaid Aug 30 '18 at 12:51
  • pointer-events is also documentated see this https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariCSSRef/Articles/StandardCSSProperties.html#//apple_ref/doc/uid/(null)-SW1 (link is also nice to use for the future).. Seams to be some touch css properties in IOS but `touch-action` (w3c standard) is not implemented (jet).. There is a feature request on the webkit page https://bugs.webkit.org/show_bug.cgi?id=133112 Safari is using that engine. – Raymond Nijland Aug 31 '18 at 12:23
  • "Is there any alternative to this in jQuery or Javascript to disable click events on div's initially and enable once the DOM has loaded completely ?" Hard to answer without also seeing the html code.. – Raymond Nijland Aug 31 '18 at 12:26

0 Answers0