活动在jQueryMobile应用消防两次 [英] Events Fire Twice in jQueryMobile Application

查看:135
本文介绍了活动在jQueryMobile应用消防两次的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个的PhoneGap JQM 应用程序的问题。在此,一个事件触发两次在Android设备上。

I have a problem with a Phonegap and jQM Application. In that, an event fires twice on Android devices.

要我设置页面转换为删除闪烁的效果。 当我点击菜单按钮,它导航到另外2页,另一事件触发,同时该网页上。

To remove the flickering effects I set page transition to 'none'. When I click on the menu button it navigates to page 2. Also, another event fires at the same time on that page.

解决方案是什么?

推荐答案

要解决触发事件的两倍,地方pageinit函数code。在HTML页面的头部为

To resolve triggering of events twice, place pageinit function code in head section of your html page as

<head>
<script type="text/javascript">
..your pageinit function code
</script>
</head>

(或)

使用jQuery 在()而不是jQuery的生活()方法。

Use jquery on() instead of jQuery live() method.

这篇关于活动在jQueryMobile应用消防两次的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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