English 中文(简体)
j 不得在数据-网页外的部件上使用“质量移动式”
原标题:jQuery Mobile styles are not getting applied in elements outside data-role="page"

In my jQM application I have a header navbar which I want to keep fixed. Because of the issue with fixed headers in jQM, I decided to have a structure like this:

<!DOCTYPE html> 
<html> 
    <head> 
    <meta name="viewport" content="width=device-width, initial-scale=1"> 
    <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css" />
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
    <script type="text/javascript" src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"></script>
</head> 
<body style="overflow:hidden;"> 
<div data-role="navbar">
    <ul>
        <li><a href="#page1" class="ui-btn-active">One</a></li>
        <li><a href="#page2">Two</a></li>
    </ul>
</div>
<div id="page1" data-role="page" style="top:80px">
    <div data-role="content">
        Page1
        <input type="button" value="Click"/>
    </div>
</div>

<div id="page2" data-role="page" style="top:80px">
    <div data-role="content">
        Page2
        <input type="button" value="Click2"/>
    </div>
</div>
</body>
</html>

意图是把bar锁定在上。 当你点击各自的表格时,应当装上该页。 自2006年以来 我为<代码>/数据-格式”网页()提供了<条码>。 但是,它并非按预期行事,因为data-role=“navbar”风格没有在头巾上应用。

任何使其发挥作用的解决办法? 提前感谢。

页: 1

最佳回答

您可使用“navbar”粉饰:$(>div:jqmData(role= navbar );navbar();

rel=“nofollow”>http://jsfiddle.net/UPZrs/1/ 你们仍然需要做一些安排。

定点:<代码> 在各类流动浏览器中,很少得到很好的支持。

问题回答

我有这个问题。 我最后只是从我的NavbarHTML中HTML取了超文本(通过PireBug)。

<div id="edge_menu">
    <ul data-role="listview" data-inset="true" class="ui-listview ui-listview-inset ui-corner-all ui-shadow">
        <li data-theme="c" class="ui-btn ui-btn-icon-right ui-li-has-arrow ui-li ui-corner-top ui-btn-up-c">
            <div class="ui-btn-inner ui-li ui-corner-top" aria-hidden="true">
                <div class="ui-btn-text">
                    <a href="/m/default.html" class="ui-link-inherit">Home</a>
                </div>
                <span class="ui-icon ui-icon-arrow-r ui-icon-shadow"></span>
            </div>
        </li>
    </ul>
</div>

如果你检查一下“贱民流动”课堂,实际上很容易改变课堂,以改变主题或四舍五入/影子的选择。

另一场工作要做的是,将贵方的菜单放在一个<>数据-role=”网页上 div上,让步移动式页面上,然后把菜单从<条码>数据-role=”网页上移至<条码><>>>>div中。





相关问题
getGridParam is not a function

The HTML: <a href="javascript:void(0)" id="m1">Get Selected id s</a> The Function: jQuery("#m1").click( function() { var s; s = jQuery("#list4").getGridParam( selarrrow )...

selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

jQuery cycle page with links

I am using the cycle plugin with pager functionality like this : $j( #homebox ) .cycle({ fx: fade , speed: fast , timeout: 9000, pager: #home-thumbs , ...

jquery ui dialog opens only once

I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.

jConfirm with this existing code

I need help to use jConfirm with this existing code (php & Jquery & jAlert). function logout() { if (confirm("Do you really want to logout?")) window.location.href = "logout.php"; } ...

Wrap text after particular symbol with jQuery

What I m trying to do, is wrap text into div inside ll tag. It wouldn t be a problem, but I need to wrap text that appears particularly after "-" (minus) including "minus" itself. This is my html: &...

热门标签