In my mobile application, I use navigation bar. and i use beta version 1.
<div data-role="navbar" id="navibar">
<ul>
<li><a href="#" id="searchNav1">Search</a></li>
<li><a href="#" id="shoppingNav1">Shopping</a></li>
</ul>
</div>
JS:
$('#shoppingNav1').live("click",function()
{
alert("in");
shopping(开发者_StackOverflow);
$.mobile.changePage("#shoppingListPage","pop", false, false);
alert("");
});
when i click this it's change the page in my desktop browser but not in actual device
You should pass an object instead of page ID:
$.mobile.changePage($("#shoppingListPage"),"pop", false, false);
'click' binding doesnt work on phone because iphone generate touch events. us 'tap' instead of "click"
精彩评论