Home  >  Article  >  Web Front-end  >  JQuery adaptive window size navigation menu with source code download_jquery

JQuery adaptive window size navigation menu with source code download_jquery

WBOY
WBOYOriginal
2016-05-16 15:41:181918browse

The rendering is as follows:

View the demo Source code download

html code:

<h1>jQuery / Zepto响应式菜单 PgwMenu 演示</h1> 
 <p class="dowebok-explain">请缩小/放大浏览器窗口宽度查看效果</p> 
 <h2>深色样式(默认)</h2> 
 <ul class="pgwMenu"> 
  <li><a class="selected" href="http://www.jb51.net/">首页</a></li> 
  <li><a href="http://www.jb51.net/">代码</a></li> 
  <li><a href="http://www.jb51.net/">素材</a></li> 
  <li><a href="http://www.jb51.net/">模板</a></li> 
  <li><a href="javascript:">关于</a></li> 
  <li><a href="javascript:">服务</a></li> 
  <li><a href="http://www.jb51.net/">联系</a></li> 
 </ul> 
 <h2>浅色样式(默认)</h2> 
 <ul class="pgwMenu light"> 
  <li><a class="selected" href="http://www.jb51.net/">首页</a></li> 
  <li><a href="http://www.jb51.net/">代码</a></li> 
  <li><a href="http://www.jb51.net/">素材</a></li> 
  <li><a href="http://www.jb51.net/">模板</a></li> 
  <li><a href="javascript:">关于</a></li> 
  <li><a href="javascript:">服务</a></li> 
  <li><a href="http://www.jb51.net/">联系</a></li> 
 </ul> 
 <h2>自定义样式</h2> 
 <ul class="pgwMenuCustom"> 
  <li><a class="selected" href="http://www.jb51.net/">首页</a></li> 
  <li><a href="http://www.jb51.net/">代码</a></li> 
  <li><a href="http://www.jb51.net/">素材</a></li> 
  <li><a href="http://www.jb51.net/">模板</a></li> 
  <li><a href="javascript:">关于</a></li> 
  <li><a href="javascript:">服务</a></li> 
  <li><a href="http://www.jb51.net/">联系</a></li> 
 </ul>

Js code

$(function () { 
   $('.pgwMenu').pgwMenu({ 
    dropDownLabel: '菜单', 
    viewMoreLabel: '更多<span class="icon"></span>' 
   }); 
   $('.pgwMenuCustom').pgwMenu({ 
    mainClassName: 'pgwMenuCustom', 
    dropDownLabel: '菜单', 
    viewMoreLabel: '更多<span class="icon"></span>' 
   }); 
  }); 

The above is the entire content of this article introducing you to the JQuery adaptive window size navigation menu. I hope you like it.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn