mobile - jQuery .hide() causing a ghost touchstart "click" of 2nd button -


I have two buttons on one page, I need to hide a "count" button so that it does not have to be repeated click But instead the user selects the "reset" button.

This works very well if both buttons are being shown, but if I hide the calculation button, once it finishes its work, then it automatically executes a reset button Is doing, but still no reset button is being clicked on.

This only happens on touch devices . It works fine when it comes to a browser, this is the only touch device (eg, iPhone) where the problem is occurring. any clue? I'm using jquery-2.1.1.min

Here's my count button:

  $ (document) .on ('touchstart click', '# Ccatulate ', function () {// do stuff // hide button Now we are done so that users do not click on $ (' #calculate ') .hide ();});  

Here is my reset button:

  $ (document) .on ('touchstart click', '#reset', function () {$ ( "Input.form-control") .val (0);});  

Here's my work example:

Have you tried without appointment?

  $ ('# count). ('TouchStart click', function () {// do stuff // hide button Now we are done so that users do not click on $ ('#calculate') .hide ();}); $ ('# Reset') ('Touchstart Click', function () {$ ("Input. Form-Control") .val (0);});  

Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -