Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/82.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/jquery-mobile/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery移动刷卡更改aspx页面_Jquery_Jquery Mobile - Fatal编程技术网

Jquery移动刷卡更改aspx页面

Jquery移动刷卡更改aspx页面,jquery,jquery-mobile,Jquery,Jquery Mobile,我有一个aspx。页面中包含刷卡事件!当事件触发时,它应该更改为另一个aspx页面!它工作正常,但是新的aspx页面出现在触发事件的同一个aspx页面上!现在我有两个内容在一边…但我只想从新的aspx页面的内容显示 这是我的代码: <asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"> <div data-role="page" id="Default"> &

我有一个aspx。页面中包含刷卡事件!当事件触发时,它应该更改为另一个aspx页面!它工作正常,但是新的aspx页面出现在触发事件的同一个aspx页面上!现在我有两个内容在一边…但我只想从新的aspx页面的内容显示

这是我的代码:

<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<div data-role="page" id="Default">
    <div data-role="content">
        <div id="swipeRight">
            <asp:Image ImageUrl="~/Images/TestSeite.png" runat="server" />
        </div>

    </div>
</div>

<script type="text/javascript">

    $(function () {
        $("#swipeLeft").live('swipeleft', function (event, ui) {
            $.mobile.changePage("/Default.aspx", "slide");
        });

        $("#swipeRight").live('swiperight', function () {
            $.mobile.changePage("/Madrid.aspx", "slide");
        });
    });

</script>

$(函数(){
$(“#swipeLeft”).live('swipeLeft',函数(事件,用户界面){
$.mobile.changePage(“/Default.aspx”,“slide”);
});
$(“#swipeRight”).live('swipeRight',function(){
$.mobile.changePage(“/Madrid.aspx”,“slide”);
});
});

如果用户向左滑动,则滑动和滑动都将被触发,因为滑动涉及所有四个方向


您最有可能使用swipeleft和swiperight。

您是否在某处有一个示例,您是否尝试过不通过AJAX加载这些页面,例如$.mobile.hashListeningEnabled=false;仍然不起作用…在我的swiperight分区a有一个很大的负载…我不知道这是从哪里来的。。。。