jQuery手机左右滑动以更改页面、单个html文件

jQuery手机左右滑动以更改页面、单个html文件,jquery,html,css,jquery-mobile,Jquery,Html,Css,Jquery Mobile,我需要能够在外部html文件的特定页面集之间滑动 如果我的所有页面都在一个html文件中,下面的代码非常有用:- <script> <!-- $('div.ui-page').live("swipeleft", function(){ var nextpage = $(this).next('div[data-role="page"]'); if (nextpage.length > 0) { $.m

我需要能够在外部html文件的特定页面集之间滑动

如果我的所有页面都在一个html文件中,下面的代码非常有用:-

<script>
    <!--
    $('div.ui-page').live("swipeleft", function(){
        var nextpage = $(this).next('div[data-role="page"]');
        if (nextpage.length > 0) {
            $.mobile.changePage(nextpage, "slide", false, true);
        }
    });
    $('div.ui-page').live("swiperight", function(){
        var prevpage = $(this).prev('div[data-role="page"]');
        if (prevpage.length > 0) {
            $.mobile.changePage(prevpage, {transition: "slide",
            reverse: true}, true, true);
        }
    });
    // -->
</script>

我怎样才能将它链接到不同的html页面,例如:page1.html到page6.html


干杯

那么,您尝试过哪些,哪些不起作用?您应该能够将url传递到
.changePage
。changePage不起作用,我无法让它进行转换或加载外部html页面。例如,单击按钮将页面更改为带有transisiton pop的page2.html。起床时,小提琴上的代码在本地不起作用?