引入文件

<!-- 引入这些文件至 <head> 中 -->
<link rel="stylesheet" href="responsive-nav.css">
<script src="responsive-nav.js"></script>

添加标签

<div id="nav">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Projects</a></li>
<li><a href="#">Contact</a></li>
</ul>
</div>

启动此插件

<!-- 将下面这段代码放置在 </body> 之前 -->
<script>
var navigation = responsiveNav("#nav");
</script>

调整参数

var navigation = responsiveNav("#nav", {

 // Selector: The ID of the wrapper
animate: true, // Boolean: 是否启动CSS过渡效果(transitions), true 或 false
transition: 400, // Integer: 过渡效果的执行速度,以毫秒(millisecond)为单位
label: "Menu", // String: Label for the navigation toggle
insert: "after", // String: Insert the toggle before or after the navigation
customToggle: "", // Selector: Specify the ID of a custom toggle
openPos: "relative", // String: Position of the opened nav, relative or static
jsClass: "js", // String: 'JS enabled' class which is added to <html> el
debug: false, // Boolean: Log debug messages to console, true 或 false
init: function(){}, // Function: Init callback
open: function(){}, // Function: Open callback
close: function(){} // Function: Close callback
});

可调用的方法

// 销毁插件
navigation.destroy(); // Toggle
navigation.toggle();

最新文章

  1. Linux 常识
  2. Easyui-combobox-checkbox-带复选框的下拉框
  3. Linux下select&amp;poll&amp;epoll的实现原理(一)
  4. Linux(centeros)安装weblogic10.3.6教程
  5. list 集合
  6. mac os 添加用户到组 命令
  7. javascript --- 再谈词法分析
  8. RMAN命令
  9. [转]C++中引用(&amp;)的用法和应用实例
  10. Thread系列——Thread.Sleep(0)
  11. EXTJS 4.2 资料 控件之Grid Columns 列renderer 绑定事件
  12. VM虚拟机安装苹果雪豹操作系统
  13. Oracle EBS-SQL (AR-1):检查应收收款发生额
  14. 将eclipse左边目录结构改为 树形结构
  15. ORACLE NLS_DATE_FORMAT设置
  16. 探索Visual Studio生成的.vs文件夹内部结构和作用
  17. 基于Tkinter以及百度翻译爬虫做的一个小的翻译软件
  18. Android24以上拍照代码
  19. 理解linux下的load
  20. PS故障风海报制作技术分享

热门文章

  1. Python面向对象之异常
  2. day22 02 面向对象的交互
  3. uC/OSii之任务划分
  4. POJ 3310 Caterpillar(图的度的判定)
  5. tcpcopy简单用法
  6. 在mysql的操作界面中,如何清屏幕
  7. sql的case when用法
  8. poj 3417 Network 题解
  9. UOJ 58 (树上带修改的莫队)
  10. SQL SERVER 2012 第四章 连接 JOIN语句的早期语法结构 &amp; 联合UNION