jquery mobile button state remains active in phonegap android

做~自己de王妃 提交于 2019-12-11 19:23:04

问题


I have created a button in my app its working fine but the problem is when I press the button it changes color and remains active after the operation is performed. I am using jquery.mobile-1.3.1.min.css

Here is the code for the button:

<a href="index.html" class="camerabtn" data-role="button" data-icon="camerabtn" data-iconpos="top" data-inline="true" onClick="capturePhoto();"></a>

I have tried using this code to reset the active state of button its working but the problem with that is when we long press the button its active state gets stuck and it remains active.

$(document).ready(function () {
  $('a').bind('click', function() {
   setTimeout("$('a').removeClass('ui-btn-active')", 250);
  });
});

回答1:


Please see my solution here https://stackoverflow.com/a/29906779/1736785 to this problem. Finally got it fixed! :)



来源:https://stackoverflow.com/questions/17228775/jquery-mobile-button-state-remains-active-in-phonegap-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!