ZoneMenu是一個菜單jQuery插件,只需占用頁面上的一個小區域,卻可以實現多級菜單。
完整HTML文件代碼:
代碼如下:
<!DOCTYPE html >
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ZoneMenu- jquery plugin</title>
<base target="_blank" />
<script type="text/javascript" src="http://keleyi.com/keleyi/pmedia/jquery/jquery-1.11.1.min.js"></script>
<link href="http://keleyi.com/jq/zonemenu/css/jquery.zonemenu.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="http://keleyi.com/jq/zonemenu/js/jquery.zonemenu.js"></script>
</head>
<body>
<div style="width: 200px; margin: 10px auto;">
<h2>
ZoneMenu Demo</h2>
</div>
<div style="width: 800px; margin: 0px auto;">
<div id="zonemenu" class="zonemenu" style="float: left">
<span class="zonemenutitle"><a href="http://xxx.com/jq/zonemenu/">ZoneMenu</a>
</span>
<div id="zonebody">
<ul>
<li><strong><a href="http://xxx.com/">xxx Home</a></strong></li>
<li><a href="http://xxx.com/menu/webqd/">WebFront</a>
<ul>
<li><a href="http://xxx.com/menu/jquery/">jQuery</a></li>
<li><a href="http://xxx.com/menu/javascript/">Javascript</a></li>
<li><a href="http://xxx.com/menu/html5/">HTML5</a></li>
<li><a href="http://xxx.com/xilie/klyjs/">js book</a></li>
<li><a href="http://xxx.com/ziliao/googlejavascriptstyle.htm">Google JavaScript</a></li>
</ul>
</li>
<li><a href="http://xxx.com/game/">Online Web Game</a>
<ul>
<li><a href="http://xxx.com/game/1/">捕魚</a> </li>
<li><a href="http://xxx.com/game/2/">不上不下</a> </li>
<li><a href="http://xxx.com/game/4/">美女拼圖</a> </li>
<li><a href="http://xxx.com/xxx/phtml/duanwu/index.htm">賽龍舟</a> </li>
<li><a href="http://xxx.com/game/5/">俄羅斯方塊</a> </li>
<li><a href="http://xxx.com/game/7/">浏覽器射擊</a> </li>
<li><a href="http://xxx.com/game/9/1/saolei.htm">掃雷(容易版)</a></li>
<li><a href="http://xxx.com/game/9/1/">Mine Sweeper</a></li>
<li><a href="http://xxx.com/xxx/phtml/silverlight/">Guess Number</a> </li>
<li><a href="http://xxx.com/game/10/">貪食蛇</a> </li>
<li><a href="http://xxx.com/game/12/">五子棋</a> </li>
<li><a href="http://xxx.com/game/13/">在線桌球</a> </li>
<li><a href="http://xxx.com/game/14/">數字拼圖</a> </li>
</ul>
</li>
<li><a href="http://xxx.com/map/">More Conent</a>
<ul>
<li><a href="http://tool.xxx.com">Tools</a>
<ul>
<li><a href="http://xxx.com/tool/md5.htm">MD5加密</a></li>
<li><a href="http://xxx.com/tool/htmlencode.htm">HTML編碼與解碼</a></li>
<li><a href="http://xxx.com/tool/urldecode.htm">URL編碼與解碼</a></li>
<li><a href="http://xxx.com/tool/regex.htm">.NET正則表達式匹配工具</a></li>
<li><a href="http://xxx.com/ziliao/js/zzbds.htm">JS正則</a></li>
<li><a href="http://xxx.com/ziliao/unicode/">Unicode字符列表</a></li>
<li><a href="http://xxx.com/tool/color.htm" title="顏色選擇器">顏色選擇器</a></li>
</ul>
</li>
<li><a href="http://xxx.com/xxx/">xxx Menu</a></li>
<li><a href="http://xxx.com/jq/myslider/">Myslider</a></li>
<li><a href="http://xxx.com/xxx/phtml/jqtexiao/6.htm">Happy Halloween!</a></li>
<li><a href="http://xxx.com/xxx/phtml/jqtexiao/7.htm">Happy Birthday!</a></li>
<li><a href="http://xxx.com/xxx/phtml/jqtexiao/7a.htm">Happy Christmas!</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div style="float: right; border: 1px solid #999; font-size: 20px; height: 40px;
line-height: 40px; width: 590px">
Welcome to ZoneMenu Home! ZoneMenu is a jQuery plugin.</div>
</div>
<script type="text/javascript">
$("#zonemenu").zonemenu();
</script>
</body>
</html>
代碼很簡單,這裡就不詳細說明了,小伙伴們自己看吧