English 中文(简体)
在Load举行的jquerymobile pages和telgap 校对活动
原标题:jquerymobile pages and Phonegap deviceready event onLoad

我知道这一点以前已经讨论过,但我没有结果。

问题是,只有一次发射装置,第一次在“清单”网页上发射。 我可以让它去做文章。 当我从一个“粒子”网页返回到“物品清单”时,该活动仍然不能奏效。 我需要每个数据页的菜单。

The js:

 <script type= text/javascript >
 function onLoad() {
    document.addEventListener("deviceready", onDeviceReady, false); 
 }


 function onDeviceReady() {
   document.addEventListener("menubutton", onMenuKeyDown, false);       
  }

   function onMenuKeyDown() {
    alert( Menu pressed );
    }
 </script>

传真:

<body onload="onLoad()">
 <div id="list" data-role="page">
   <ul id="articleList" data-role="listview">
    <li id="list1"><a id="link1" href="#article1"></li>  
    <li id="list2"><a id="link1" href="#article2"></li>  
   </ul>
</div>

<div id="article1" data-role="page">Content</div>
<div id="article2" data-role="page">Content</div>

I m with: cordova-1.5.0 /jquery.mobile-1.1.0-rc.2 /jquery-1.7.1 /Android

任何帮助?

问题回答

我刚刚很快地在当时工作的Im中测试了这一结果。 Telephonegap-1.6.1 and jquery.mobile-1.1.0 final

或许,你应努力提升你的电话和频率。 流动





相关问题
Rails: Ajax: Changes Onload

I have a web layout of a for that looks something like this <html> <head> </head> <body> <div id="posts"> <div id="post1" class="post" > &...

Body onload in Javascript

I had written one JS in asp.net. I had called that from body onload, but the JS doesn t get called where I have put my debugger. What could be possible reasons for this? I m developing website in ...

How to track the user in an iframe

I want to track what happens inside an iframe when a user clicks on links in the IFrame. The page that contains the iframe (the parent) is to track the user´s navigation through the page in the iframe....

热门标签