jQuery标题中的多个按钮

时间:2014-10-16 18:18:06

标签: javascript jquery css html5 jquery-mobile

我正在尝试将3个按钮添加到我使用jQuery制作的移动网络应用程序的标题中。

我可以制作2个按钮但是只要我将第3个按钮放在第一个消息符号上:/

我在这个问题中尝试了答案:Adding many buttons to header in JQuery Mobile

但是由于某些原因,jquery样式不适用于标题内的div标签。

我的标题目前有以下代码:

<div data-role="header">
    <div class="ui-btn-left" data-role="controlgroup" data-type="horizontal">
        <a href="#" id="homebtn" data-roll="button" data-icon="home" data-iconpos="notext"></a>
        <a href="#" id="searchbtn" data-roll="button" data-icon="search" data-iconpos="notext" class="ui-btn-left"></a>
    </div>
        <h1 id="usr"></h1>
    <a href="#" id="profileButton" data-roll="button" data-icon="info">Profile</a>  

    </div>

我的网页如下:

enter image description here

有没有人知道为什么会这样?

请原谅任何语法/拼写错误:我有阅读障碍,可能在校对中错过了一些

1 个答案:

答案 0 :(得分:-1)

好的,所以感谢@TSV,他指出我使用的是“数据滚动”而不是“数据角色”

实际上完全解决了我的问题:)