jquery mobile 1.4和android浏览器的问题

时间:2014-01-21 16:19:24

标签: android jquery mobile browser

我将代码从jqm 1.3.2更新为1.4.0。为确保升级后没有问题,我将导航按钮复制到测试文件中。果然,它不适用于三星Galaxy 3上的移动浏览器,但在Chrome中运行良好。它在win 7笔记本电脑上的Chrome,FF 26.0和IE 11也可以正常使用。这是我的代码 -

<!DOCTYPE html>
<html>

<head>
<title>whnwh</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="css/jquery.mobile-1.4.0.css" />
    <script src="js/jquery-1.10.2.js"></script>
    <script src="js/jquery.mobile-1.4.0.js"></script>
</head>

<body>

    <div data-role="page" id="p_home" data-title="when n where" data-theme="a">

        <div data-role="header"><!-- header -->
            <p />
            <img src="images/logo.png" />
        </div><!-- /header -->

        <div role="main" class="ui-content">
        <div data-role="controlgroup" data-mini="false" data-corners="false" data-type="horizontal"><!-- navbar -->
            <a href="index.html" class="ui-btn ui-corner-all ui-btn-inline" id="home">home</a> 
            <a href="" class="ui-btn ui-corner-all ui-btn-inline" id="my">my calendar</a> 
            <a href="add.html" class="ui-btn ui-corner-all ui-btn-inline" id="add">add</a> 
            <a href="authreg.html" class="ui-btn ui-corner-all ui-btn-inline" id="sgnin">sign in</a> 
            <a href="" class="ui-btn ui-shadow ui-corner-all ui-btn-inline" id="sgnout">sign out</a> 
        </div>
        </div><!-- /navbar -->

    </div><!-- page p_home -->
    </script>

</body>
</html>

这就是上面的页面在Galaxy浏览器中的显示方式 -

enter image description here

以及Galaxy上的Chrome以及笔记本电脑上的所有浏览器 -

enter image description here

那么,我该怎么做才能解决这个问题?

提前致谢。

RD

2 个答案:

答案 0 :(得分:0)

我想无论是否有人遇到过这个问题,或者没有人有答案 我在迁移和修复1.3.2和1.4.0之间的所有不兼容性方面已经失去了一天 我很沮丧,将恢复到1.3.2 jqm并在稍后的时间开始执行此任务。

答案 1 :(得分:0)

你并不孤单! 以下配置与我的android galaxy 2不兼容。

<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.1/jquery.mobile-1.4.1.min.css">
<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.1/jquery.mobile-1.4.1.min.js"></script>  

我分别测试了jquery-1.10.2.min.js,它运行得很好。这只是因为jquery.mobile-1.4.1.min.js。

以前的jquery移动版本可以使用

<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css" />
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script>