问题
I have a problem with a Phonegap and jQM Application. In that, an event fires twice on Android devices.
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.
What is the solution?
回答1:
Paste the below code snippet in the head section of your web page in style tags.This may help.
.ui-page {
-webkit-backface-visibility: hidden;
}
回答2:
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>
(or)
Use jquery on() instead of jQuery live() method.
来源:https://stackoverflow.com/questions/16536973/events-fire-twice-in-jquerymobile-application