【问题标题】:How can I create a list divider for a collapsible set in jquery mobile如何在 jquery mobile 中为可折叠集创建列表分隔符
【发布时间】:2014-11-03 13:02:17
【问题描述】:

我有一个看起来像这样的可折叠套装:

<div data-role="collapsible-set">
  <div data-role="collapsible">
    <h1>
       <span style="font-size: 16px; font-weight: bold; white-space: pre-wrap;" id="title">This is a really long book title</span><br>
       <span style="font-size: 14px; font-weight: normal;" id="author">This is the Author of the book</span>
       <span style="font-size: 14px; font-weight: normal; font-style: italic;" id="year">Yr</span>
    </h1>
        <div>Statis</div>        
   </div>
</div>

但是,我似乎找不到将列表分隔符添加到可折叠集合的方法。例如,我曾经有一个项目列表,可以添加一个属性:data-role="list-divider",如下所示:

这对于可折叠的集合是不可能的吗?

【问题讨论】:

    标签: html css jquery-mobile


    【解决方案1】:

    list-divider 属性适用于 listview 小部件,而 collapsible-set 是不同类型的小部件。您不能在 listview 实例之外使用 list-divider 函数。当然,您可以将列表视图包含在可折叠集中,但整个列表将被公开或隐藏。

    【讨论】:

    • 我想这在某种程度上是可行的。我所做的是我首先将我的列表分隔符放在一个列表中,然后在它下面有我的可折叠集:jsfiddle.net/k9ocb8sg/4
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-11-25
    • 2012-08-10
    相关资源
    最近更新 更多