jQuery插件创建一个侧面部分的菜单,您可以滚动到页面上的不同部分。
HTML
1 2 3 4 5 6 7 8 9 10 11 12 13 | < html > < body > < section id = "home" data-section-menu = "Home" > < p >Home</ p > </ section > < section id = "about" data-section-menu = "About" > < p >About</ p > </ section > < section id = "contact" data-section-menu = "Contact" > < p >Contact</ p > </ section > </ body > </ html > |
CSS
1 | < link rel = "stylesheet" href = "assets/css/jquery.sectionmenu.css" /> |
Javascript
1 2 3 | < script type = "text/javascript" src = "assets/js/jquery.fragmentscroll.min.js" ></ script > < script type = "text/javascript" src = "assets/js/jquery.sectionmenu.min.js" ></ script > |
1 2 3 4 5 | <script type= "text/javascript" > $(window).load( function () { $( 'body' ).sectionMenu().fragmentScroll(); }); </script> |
选项
1 2 3 4 5 6 7 8 9 10 11 12 | $( 'body' ).sectionMenu({ // Show title in the menu enableTitle: true , // Outer element element: 'nav' , // Class and data- name class: 'section-menu' , // Insert content before the menu insertBefore: '' , // Insert content after the menu insertAfter: '' }); |
特别申明:
本站所有资源都是由网友投稿发布,或转载各大下载站,请自行检测软件的完整性!
本站所有资源仅供学习与参考,请勿用于商业用途,否则产生的一切后果将由您自己承担!
如有侵权请联系我们删除下架,联系方式:lei1294551502@163.com