有没有人知道如何实现展开/折叠只在图标点击collapsibe div?JQuery-Mobile在图标上单击展开/折叠?
-1
A
回答
1
我发现下面的方法:
...
collapsibleHeading.find(".ui-icon").bind("click", function (event) {
var type = collapsibleHeading.is(".ui-collapsible-heading-collapsed") ?
"expand" : "collapse";
collapsible.trigger(type);
event.preventDefault();
});
如果您需要更多的细节让我知道吧。
1
尝试jQM的Collapsible content。所有你需要的就是添加data-role="collapsible"
一个DIV,例如:
<div data-role="collapsible">
<h3>I'm a header</h3>
<p>
I'm the collapsible content.
By default I'm closed, but you can click the header to open me.
</p>
</div>
+0
我的意思是点击图标。不是div标题点击。 – Alexandr
相关问题
- 1. 展开和折叠图标
- 2. JQuery jQGrid在标题图层上展开/折叠网格点击
- 3. JQueryMobile可折叠标题
- 4. 通过单击文本在树状图中展开/折叠组
- 5. C#EXT:GridCommand:单击单击展开双击折叠RowExpander
- 6. JQuery用Font Awesome图标展开折叠
- 7. 展开/折叠,更新图标类
- 8. Bootstrap 3 - 展开折叠图标
- 9. 菜单展开/折叠表
- 10. 菜单展开和折叠
- 11. 折叠/展开图片
- 12. 在标题上设置展开/折叠背景图像
- 13. 在视图上展开和折叠标准可可控件
- 14. 在JavaScript中展开折叠菜单HTML
- 15. 在android中展开折叠单元格
- 16. 展开/折叠Div
- 17. 展开/折叠 - Javascript
- 18. 折叠/展开Groupboxes
- 19. 展开/折叠divs
- 20. jquery展开/折叠?
- 21. 展开/折叠jQuery
- 22. 折叠/展开optgroups
- 23. 折叠/展开表
- 24. 展开/折叠div点击多个div
- 25. 点击展开,单击时折叠所有其他人
- 26. 在html表上展开折叠
- 27. 在WPF DataGrid上展开/折叠行
- 28. 在Datagridview中展开/折叠
- 29. 展开时手风琴折叠菜单侧面图标更改
- 30. Javascript展开/折叠div加载展开而不是折叠
显示一些代码。 – Th0rndike