在data-role中使用data-iscroll ="可折叠"

时间:2014-04-28 09:25:09

标签: javascript jquery

我想创建一个可折叠的内容,其中包含项目列表

(ul data-role =“listview”)

将使用data-iscroll具有滚动功能。

1 个答案:

答案 0 :(得分:0)

我想这就是你所期待的。希望这可能有所帮助。

 <ul style="padding: 10px;width: 300px;"> 
    <li style="background: #e2ffff;padding: 5px;font-weight: bold;" id="first">Title1
        <ul style="font-size: 14px; font-weight: normal; background-color: rgb(238, 34, 255); padding: 10px; display: none; max-height: 60px; overflow-y: auto;" id="content">
             <li>This is sample test This is sample test This is sample test This is sample test This is sample test This is sample test This is sample test This is sample test This is sample test This is sample test
             </li>
        </ul>
      </li>
    </ul>
    <script>

    $("#first").click(function(){
    $("#content").slideToggle(1000);

    });
    </script>

谢谢和问候。