我正在使用ASP.net MVC4和jquery mobile。
我试图在'mobileinit'绑定中将转场页面效果设置为$.mobile.defaultPageTransition为'none',但是什么也没有发生,默认的转场(幻灯片)仍然存在!
我甚至尝试过直接更改jquery.mobile-1.0.js,也没有什么变化。
有人有什么建议吗?
发布于 2012-03-13 02:16:50
您是否在正确的位置绑定到mobileinit?
<script src="jquery.js"></script>
<script>
$(document).bind("mobileinit", function(){
$.mobile.defaultPageTransition = 'none';
});
</script>
<script src="jquery-mobile.js"></script>注意,首先加载jQuery核心,然后绑定到mobileinit事件,然后加载jQuery Mobile文件。
文档:http://jquerymobile.com/demos/1.1.0-rc.1/docs/api/globalconfig.html
这是一个演示:http://jsfiddle.net/JczRj/
https://stackoverflow.com/questions/9671958
复制相似问题