链接到其他页面时,Jquery移动选项卡不起作用

时间:2014-04-16 08:25:22

标签: javascript jquery html jquery-mobile tabs

您好我是jquery mobile的新手。我的应用程序中有两个页面。请c下面的代码

的index.html

    <!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>Smart Realtor</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">

    <link rel="stylesheet" href="css/smartrealtor-theme.css" />
    <link rel="stylesheet" href="css/custom.css">
    <link rel="stylesheet" href="css/themes/default/jquery.mobile.structure-1.4.2.css">
    <link rel="stylesheet" href="css/themes/default/jquery.mobile.icons-1.4.2.css">
    <link rel="stylesheet" href="css/jqm-icon-pack-fa.css">


  <!--  <script src="js/jquery.js"></script>-->
<!--    <script src="js/globalsetting.js"></script>-->
 <!--   <script src="js/jquery.mobile-1.4.2.min.js"></script>-->
<!--    <script src="js/cordova.js"></script>
    <script src="js/Calendar.js"></script>
    <script src="js/Message.js"></script>-->

  <script src="//code.jquery.com/jquery-1.10.2.min.js"></script>
  <script src="//code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.js"></script>




</head>

<body>
    <div data-role="page" data-title="Panel fixed positioning" class=" signupBG" id="landingPage">

        <div data-role="content">

            <div role="main" class="ui-content jqm-content jqm-fullwidth">

                <div id="logoCenter">
                    <img src="images/smartrealtor_logo_large@x2.png" alt="" width="300" height="310" class="scale-with-grid" />
                </div>
                <div class="ui-grid-a">
                   <!-- Click here to register page -->
                    <a href="register.html" class="ui-btn ui-corner-all ui-shadow" >Register</a>
                </div>
                <div class="ui-grid-a">
                    <a href="sign-in.html" class="ui-btn ui-corner-all ui-shadow">Sign in</a>
                </div>

            </div>
            <!-- /login/register -->
        </div>

    </div>




    <!-- Login Screen -->

    <!-- /login screen -->

    <!-- Forget Password Screen -->

    <!-- /forget pass screen -->

    <!-- Register Screen -->

    <!-- /register screen -->

    <!-- Team Leader Register Screen -->


    <!-- /register screen -->




</body>
</html>

Register.html

<div data-role="page" data-title="Panel fixed positioning" class=" signupBG" id="loginPage">

    <div data-role="content">
            <div data-role="tabs" id="tabs" class="transparentBg">
            <div data-role="navbar" data-grid="a" class="topNav  topfilter">
              <ul id="navfilter">
                <li><a href="#nAgent" data-role="button" id="btnAgent" class="ui-btn ui-btn-border ui-btn-white ui-btn-active">Agent</a></li>
                <li><a href="#nTeamleader" data-role="button" class="ui-btn ui-btn-border ui-btn-white" id="btnTeam">Team Leader</a></li>
            </ul>
            </div>
            <div id="nAgent" class="ui-body-d ui-content">
                <h1>First tab contents</h1>
            </div>
            <div id="nTeamleader">
                <ul data-role="listview" data-inset="true">
                    <li><a href="#">Acura</a></li>
                    <li><a href="#">Audi</a></li>
                    <li><a href="#">BMW</a></li>
                    <li><a href="#">Cadillac</a></li>
                    <li><a href="#">Ferrari</a></li>
                </ul>
            </div>
        </div>
        </div>


    </div>

我在tab.html内的tabpanel。但它没有工作。选项卡面板不会刷新内容。任何人解决方案?

0 个答案:

没有答案