jQuery Mobile的按钮状态保持在PhoneGap的机器人活跃 [英] jquery mobile button state remains active in phonegap android

查看:146
本文介绍了jQuery Mobile的按钮状态保持在PhoneGap的机器人活跃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的应用程序创建了一个按钮,它工作正常,但问题是,当我preSS它改变颜色和执行操作后仍然有效的按钮。我使用的 jquery.mobile-1.3.1.min.css

下面是code的按钮:

 < A HREF =的index.html级=camerabtn数据角色=按钮数据图标=camerabtn数据iconpos =顶数据 - 内嵌=真的onClick =capturePhoto();>&下; / A>

使用这个code重置按钮的活动状态的工作,但这样做的问题是,当我们长preSS按钮激活状态卡住,它仍然活跃的我都试过了。

  $(文件)。就绪(函数(){
  $('A')。绑定(点击,函数(){
   的setTimeout($('A')removeClass移除(UI-BTN-主动)。,250);
  });
});


解决方案

请在这里看到我的解决方案 http://stackoverflow.com/ A /一百七十三万六千七百八十五分之二千九百九十零万六千七百七十九这个问题。终于把它固定! :)

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);
  });
});

解决方案

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

这篇关于jQuery Mobile的按钮状态保持在PhoneGap的机器人活跃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆