无限级ddsmoothmenu菜单实例

时间:2024-04-07 13:03:48

点击这里查看效果
以横向ddsmoothmenu下来菜单为例,以下是实现代码:

 <base target="_blank" /><link rel="stylesheet" type="text/css" href="http://keleyi.com/keleyi/phtml/menu/6/ddsmoothmenu.css" />
<script type="text/javascript" src="http://keleyi.com/keleyi/pmedia/jquery/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="http://keleyi.com/keleyi/phtml/menu/6/ddsmoothmenu.js"></script>
<div id="smoothmenu1" class="ddsmoothmenu">
<ul>
<li><a href="http://keleyi.com/a/bjac/h2dj4d34.htm">Item 1</a></li>
<li><a href="http://keleyi.com/keleyi/phtml/menu/6.htm">Folder 0</a>
<ul>
<li><a href="http://keleyi.com/a/bjac/0xusjq8m.htm">Sub Item 1.1</a></li>
<li><a href="http://keleyi.com">Sub Item 1.2</a></li>
<li><a href="http://keleyi.com">Sub Item 1.3</a></li>
<li><a href="http://keleyi.com">Sub Item 1.4</a></li>
<li><a href="http://keleyi.com/a/bjac/2fs4sdog.htm">Sub Item 1.2</a></li>
<li><a href="http://keleyi.com">Sub Item 1.3</a></li>
<li><a href="http://keleyi.com/a/bjac/usklan8m.htm">Sub Item 1.4</a></li>
</ul>
</li>
<li><a href="http://keleyi.com">Folder 1</a>
<ul>
<li><a href="http://keleyi.com">Sub Item 1.1</a></li>
<li><a href="http://keleyi.com">Sub Item 1.2</a></li>
<li><a href="http://keleyi.com/a/bjac/06ysbxv0.htm">Sub Item 1.3</a></li>
<li><a href="http://keleyi.com/a/bjac/xvcdrv0w.htm">Sub Item 1.4</a></li>
<li><a href="http://keleyi.com/a/bjac/ara6jk5h.htm">Sub Item 1.2</a></li>
<li><a href="http://keleyi.com/a/bjac/4yiwpvt0.htm">Sub Item 1.3</a></li>
<li><a href="http://keleyi.com/a/bjac/k3qur783.htm">Sub Item 1.4</a></li>
</ul>
</li>
<li><a href="http://keleyi.com/a/bjac/79a7a1f25a339e0a.htm">Item 3</a></li>
<li><a href="http://keleyi.com/a/bjac/4w0otu4n.htm">Folder 2</a>
<ul>
<li><a href="http://keleyi.com">Sub Item 2.1</a></li>
<li><a href="http://keleyi.com">Folder 2.1</a>
<ul>
<li><a href="http://keleyi.com">Sub Item 2.1.1</a></li>
<li><a href="http://keleyi.com">Sub Item 2.1.2</a></li>
<li><a href="http://keleyi.com">Folder 3.1.1</a>
<ul>
<li><a href="http://keleyi.com">Sub Item 3.1.1.1</a></li>
<li><a href="http://keleyi.com/a/bjac/qm8rslq3.htm">Sub Item 3.1.1.2</a></li>
<li><a href="http://keleyi.com">Sub Item 3.1.1.3</a></li>
<li><a href="http://keleyi.com/a/bjac/ca7qisib.htm">Sub Item 3.1.1.4</a></li>
<li><a href="http://keleyi.com">Sub Item 3.1.1.5</a></li>
</ul>
</li>
<li><a href="http://keleyi.com/a/bjac/sxq4jj4d.htm">Sub Item 2.1.4</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="http://keleyi.com/menu/javascript/">Item 4</a></li>
</ul>
<br style="clear: left" />
</div>
<script type="text/javascript"> ddsmoothmenu.init({
mainmenuid: "smoothmenu1", //menu DIV id
orientation: 'h', //横向设置"h",竖向为"v"
classname: 'ddsmoothmenu', //class added to menu's outer DIV
//customtheme: ["#1c5a80", "#18374a"],
contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
}) </script>

转载自:http://keleyi.com/a/bjac/h2dj4d34.htm

web前端:http://www.cnblogs.com/jihua/p/webfront.html