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

JQuery adaptive window size navigation menu with source code download_jquery

WBOY
Release: 2016-05-16 15:41:18
Original
1949 people have browsed it

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>
Copy after login

Js code

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

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

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template