stuyam / pressure

:point_down::boom: JavaScript library for handling Force Touch, 3D Touch, and Pointer Pressure.
https://pressurejs.com
MIT License
2.92k stars 97 forks source link

for some reason it is not working #68

Closed ghost closed 7 years ago

ghost commented 7 years ago

hi .. first of all I would like to thank you for your work .. looks great in the examples but for some reason non of these working with me .. jquery-3.1.1

     $('#divpic').pressure({
        start: function(event){
          alert("deep pressure start");
        },
        end: function(){
          alert("deep pressure start");
        },
        startDeepPress: function(event){
          alert("deep pressure start");
        },
        endDeepPress: function(){
          alert("deep pressure end");
          //var $this = $(this);
          //var modalval = this.ref.value;
          //$("#myModalpic"+modalval).modal();
        },
        change: function(force, event){
          alert("deep pressure end");
        },
        unsupported: function(){
          alert("unsupported browser");
        }
      });

Please provide information about the device you are seeing the issue on Tested on Chrome latest version, Firefox latest version Safari iPhone 7 plus , chrome on 7plus

stuyam commented 7 years ago

Hey @abdullascript sorry for the late response. I saw that you closed the issue, did you get it working? If so how did you fix it?

ghost commented 7 years ago

@stuyam it's ok bro, actually it was a logical error

I call/assign/set Pressure right after $(document) ready when I should do it after $.ajax success

It works perfectly on iOS :)

P.S take a look at your twitter account DM