1

在 windows phone 模拟器中,简单的 jquery 移动多页导航不起作用。有没有人有办法解决吗?

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, height=device-height, initial-      
scale=1.0, maximum-scale=1.0, user-scalable=no;" />
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="css/custom.min.css" />
<link rel="stylesheet" href="css/jquery.mobile.structure-1.1.0.min.css" />
<link rel="stylesheet" href="css/master.css" />
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="js/phonegap-1.3.0.js"></script>
<script type="text/javascript" charset="utf-8" src="js/jq.mob-1.1.0.min.js"></script>
<script type="text/javascript" charset="utf-8" src="js/data.js"></script>
<script type="text/javascript" charset="utf-8" src="js/knockout.js"></script>         
<script type="text/javascript">

    document.addEventListener("deviceready", onDeviceReady, false);

    // PhoneGap is loaded and it is now safe to make calls PhoneGap methods
    //
    function onDeviceReady() {

    }


</script>
</head>
<body>
<!-- Home Page -->
<div data-role="page" id="home" data-theme="a">
    <div data-role="header">
        <h1>Menu</h1>
    </div>
    <div data-role="content">
        <h2>Menu</h2>
        <a href="#page1">page 1</a>
    </div>
</div>
<!-- Home Page End -->
<!-- Page 1 -->
<div data-role="page" id="page1" data-theme="a">
    <div data-role="header">
        <h1>Page 1</h1>
    </div>
    <div data-role="content">
        <h2>Page 1</h2>
    </div>
</div>
<!-- Page 1 End -->
</body>

编辑:为了更清晰,我添加了头部部分。

我认为 Windows 手机的多页导航必须被打破,所以如果有人知道替代方案,我将不胜感激

4

1 回答 1

0

您可以使用自己的函数来显示和隐藏 div,方法是使用 display 属性和 document.getElementById('')

于 2013-03-31T13:11:21.897 回答