jquerymobile-20 可折叠内容(Collapsible content)
来源:互联网 发布:无线网络规划软件 编辑:程序博客网 时间:2024/06/10 01:45
可能我们在开发中遇到过这样的问题,我们只是看到一个题目或者简单的介绍,然后一点击会在下面展开对应的详细的内容。在jqm中实现这个效果很简单。下面给出一段例子代码:
<!DOCTYPE html><html><head><title>Collapsible Content - 2</title><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="http://code.jquery.com/mobile/latest/jquery.mobile.min.css" /><script src="http://code.jquery.com/jquery-1.7.1.min.js"></script><script src="http://code.jquery.com/mobile/latest/jquery.mobile.min.js"></script></head><body><div data-role="page" id="first"><div data-role="header"><h1>Collapsible Test</h1></div><div data-role="content"><div data-role="collapsible"><h3>First</h3><p> Hello World...</p></div><div data-role="collapsible"><h3>First</h3><p> Hello World...</p></div><div data-role="collapsible" data-collapsed-icon="arrow-r" data-expanded-icon="arrow-d"><h3>First</h3><p> Hello World...</p></div> <div data-role="collapsible" data-content-theme="c" data-iconpos="right"> <h3>First</h3> <p> Hello World again... </p> </div></div></div></body></html>
页面显示如下:第一个未点开,第二、三、四个都点击开了。
第三个使用了data-collapsed-icon="arrow-r" data-expanded-icon="arrow-d"修改icon。
第四个使用data-content-theme="c"修改显示的主题,使其内容被带有边框的内容包围。 data-iconpos="right"使icon显示在右边。
我们可以将所有带有data-role="collapsible"属性的div,包围在一个<div data-role="collapsible-set">中,使其组成一个整体,但是这样点击其中一个的时候,其他的会自动关闭。这样的显示效果如下:
- jquerymobile-20 可折叠内容(Collapsible content)
- jquerymobile-10 可折叠内容(Collapsible content)
- jquerymobile之collapsible可折叠块题目内容动态显示
- jQueryMobile的(十) 可折叠内容块
- jQuery Mobile基础05----jQuery Moblie Widgets-collapsible(可折叠的
- jQueryMobile的组件——可展开项(collapsible)
- 内容:.content和.scroll-content
- jquerymobile
- jqueryMobile
- jQueryMobile
- jquerymobile-3 page title和网页预提取(Prefetching content)
- jquerymobile的content高度100%占满屏幕剩余空间
- Dynamic collapsible动态加载collapsible
- Content(内容)
- css3 content 生成内容
- content Provider 内容提供者
- Content Provider内容提供者
- Content Provider 内容提供者
- 04_样式与动画
- 2012年总结:补课的一年。
- Yii: 扩展CGridView增加导出CSV功能
- 动态内存申请函数选择(realloc、malloc 、alloca、 calloc)
- HYSBZ 2806 [Ctsc2012]Cheat
- jquerymobile-20 可折叠内容(Collapsible content)
- shell代码规范
- grep
- ios 简化线程处理用NSOperationQueue
- HDU 1249 三角形
- mysql api for C详细介绍
- Oracle AIM
- url去重
- Android--用SAX解析xml文件