多个jQuery Mobile Count Bubbles

时间:2013-06-01 11:04:29

标签: css jquery-mobile

是否可能有多个jQuery移动计数气泡,例如你可以在这里看到每个项目旁边只显示一个气泡,但我需要6 http://jquerymobile.com/demos/1.2.0/docs/lists/lists-count.html

这甚至可能吗?或者我会使用不同的功能?

1 个答案:

答案 0 :(得分:7)

工作示例:http://jsfiddle.net/Gajotres/kvgUU/

HTML:

<ul data-role="listview" data-count-theme="c" data-inset="true">
    <li><a href="#">
        Inbox 
        <span class="ui-li-count">12</span>                        
        <span class="ui-li-count count-second">62</span>
        <span class="ui-li-count count-third">62</span>
        <span class="ui-li-count count-fourth">62</span>
        <span class="ui-li-count count-fifth">62</span>
        <span class="ui-li-count count-sixt">62</span></a>
    </li>
    <li><a href="#">
        Outbox 
        <span class="ui-li-count">62</span>
        <span class="ui-li-count count-second">0</span></a>
    </li>
    <li><a href="#">
        Drafts 
        <span class="ui-li-count">62</span>
        <span class="ui-li-count count-second">4</span></a>
    </li>
</ul>

CSS:

.count-second {
    right: 70px !important;
}

.count-third {
    right: 100px !important;
}

.count-fourth {
    right: 130px !important;
}

.count-fifth {
    right: 160px !important;
}

.count-sixt {
    right: 190px !important;
}