Jquery Mobile 1.4 external panel do not open after navigating to other page

三世轮回 提交于 2019-12-05 13:42:39
Cvetan Himchev

Omar is right the $.mobile.defaultPageTransition = 'none'; is causing the problem when I removed it everything works.

EDIT: It's fixed in jquery mobile 1.4.2, see https://github.com/jquery/jquery-mobile/issues/6650


Thanks to the hint from Cvetan I was able to solve this problem using a custom animation:

.dummy.in{}
.dummy.out{}
.in{-webkit-animation-timing-function: ease-out;-webkit-animation-duration: 0ms;-moz-animation-timing-function: ease-out;-moz-animation-duration: 0ms;}
.out{-webkit-animation-timing-function: ease-in;-webkit-animation-duration: 5ms;-moz-animation-timing-function: ease-in;-moz-animation-duration: 5ms;}

Then I've told jqm to use this transition as default with:

$.mobile.defaultPageTransition = 'dummy';

And thats it, no visible page transition animation and a fully working panel.

    <style type="text/css">
        .ui-panel-dismiss{display:none;}
        #p1, #p2{margin-left:17em;}
    </style>
    <script id="panel-init">
    $(function() {
        $( "body>[data-role='panel']" ).panel();
    });
            $(function(){$("#sidebar").panel();});
            $(document).on("pageshow", ":jqmData(role=page)", function() {you
                 $("#menu").panel("open");
    });
    </style>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!