mmenu:单击菜单项以展开? [英] mmenu: Click a menu item to expand?
本文介绍了mmenu:单击菜单项以展开?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
默认情况下,您必须在 mmenu 中单击箭头(位于菜单项右侧)以显示子菜单.
By default in mmenu, you have to click the arrow (to the right of the menu item) to show the submenu.
是否可以更改它,以便当您单击菜单项上的任意位置(不必是箭头)时,它也会扩展吗?
Is there a way to change it so that when you click anywhere on a menu item (doesn't have to be the arrow) it will expand as well?
我的菜单大致如下:
<ul>
<li><a href='Page1.aspx'>Item with no submenu</a></li>
<li><a>Click this to expand</a>
<ul>
<li><a href='sub1.aspx'>Submenu 1</a></li>
<li><a href='sub2.aspx'>Submenu 2</a></li>
</li>
</ul>
推荐答案
It is possible to do this with using span tags (as seen here in the right menu on one of their demos). Give this a try:
<ul>
<li><a href='Page1.aspx'>Item with no submenu</a></li>
<li>
<span>Click this to expand</span>
<ul>
<li><a href='sub1.aspx'>Submenu 1</a></li>
<li><a href='sub2.aspx'>Submenu 2</a></li>
</ul>
</li>
</ul>
(您还缺少嵌套无序列表的结尾.
(You were also missing a closing on your nested unordered list.
这篇关于mmenu:单击菜单项以展开?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文