我刚刚开始在phonegap/xcode 上编写我的第一个iOS 应用程序。 我当前的phonegap版本是3.1.0,xcode是5.0
由于我想实现一些jquery移动功能,例如固定页眉/页脚,我已将脚本实现到我的index.html中,但它仍然无法工作。
这是我的固定页眉/页脚代码:
CSS:
#topbar{
display:block;
margin-left:0px;
margin-top:0px;
width:320px;
height:54px;
background-color:#000;}
index.html:
<html>
<head>
<script src="js/jquerymobile.js"></script>
<script src="js/jquerymobile-1.3.2.js"</script>
<script src="js/jquery.mobile-1.3.2.min.js"</script>
</head>
<body>
<div data-role="topbar" data-position="fixed" data-tap-toggle="false"></div>
</body>
</html>
出于某种原因,我认为 jquery 没有被调用到应用程序中。如何解决此问题或我缺少哪些代码/脚本? 提前致谢!
最佳答案
您必须在 jquery mobile 之前导入 jquery,并且记住,要使用 jquery mobile,它必须是 2.0 之前的版本。
关于javascript - Phonegap iOS jquery 固定 header 不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20250289/