I'm trying to change page on document ready
$.mobile.changePage('#loginPage');
but it throws a 404 error:
"NetworkError: 404 Not Found - http://localhost/mBanka/v5/log开发者_如何转开发inPage"
Look into jQM events http://jquerymobile.com/demos/1.0b1/#/demos/1.0b1/docs/api/events.html
$('div').live('pageshow',function(event, ui){
alert('This page was just hidden: '+ ui.prevPage);
});
It looks like an example of not reading the docs carefully. :)
You need to pass a jQuery object if referencing page in the same document. This should work.
$.mobile.changePage($('#loginPage'));
If not - put more info in your question
精彩评论