标签:jquery mobile html5 jquery.mobile.change changepage 页面跳转 jqm
jQuery.mobile.changePage方法用的还是很多的。作为一个老手,有必要对jQuery mobile中实用方法做一些总结。系列文章请看jQuery Mobile专栏。jquery.mobile.changepage是过时的jQuery Mobile 1.4.0及将被删除在1.5.0。使用pagecontainer部件的change()法代替。$.mobile.changePage( "../resources/us.html", {
transition: "slideup",
changeHash: false
});
$.mobile.changePage( "../resources/results.php", {
type: "post",
data: $( "form#search" ).serialize(),
changeHash: false
});
$.mobile.changePage( "../resources/confirm.html", {
transition: "pop",
reverse: false,
changeHash: false
});
//以slideup效果 跳转到 "about us" 页面
$.mobile.changePage("about/us.html", "slideup");
//以pop效果 跳转到 "confirm" 页面 并且在url hash里不记录其历史
$.mobile.changePage("../alerts/confirm.html", "pop", false, false);
//跳转到 "search results" 页面,提交id为 "search"的表单数据
$.mobile.changePage({url:"searchresults.php" , type:"get" , data: $("form#search").serialize() });
//将页面url,类型,数据定义为变量来传递。
$.mobile.changePage({ url: formresults.php, type: 'get', data:$('form#myform').serialize () });
//使用changepage来加载第三个页面
$.mobile.changePage([$.mobile.activePage.data ('ui.prevPage'), anotherPreviousPage], 'pop');jQuery Mobile中jQuery.mobile.changePage方法使用详解
标签:jquery mobile html5 jquery.mobile.change changepage 页面跳转 jqm
原文地址:http://blog.csdn.net/xmtblog/article/details/44830799