使用jqm的select
如果一个select的option很长,点击select的时候就会跳转到新的页面,在这种情况下使用本地的select就可以避免这个问题
<div>
<select data-native-menu="false"> 使用data-native-menu="false"可以不使用jqm的select样式
<option>one</option>
<option>two</option>
....................
</select>
</div>
使用jqm禁止页面缩放
使用jqm的三个文件
<link rel="stylesheet"href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" />
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
还要一个不可缺少的就是
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.3, user-scalable=no">
它可以使页面自适应屏幕,但是有时候屏幕在点击时候会缩放,所以加了user-scalable="no" 禁止缩放,
jqm footer不固定
在用到footer时,点击空白区,footer会上下调跳动,不固定,
<div data-role="content" data-position="fixed"></div>
但是有时候不起作用,还要加上
<div data-role="content" data-position="fixed" data-tap-toggle="false"></div>
如果还不起作用
<div data-role="content" data-position="fixed" data-tap-toggle="false" style="position:fixed"></div>
这样可以解决footer不能固定在底部的办法