引用jquery库、jquery-listnav.js和所需样式到您的页面
1 2 3 | < script src = "js/jquery-1.11.0.min.js" ></ script > < script src = "js/jquery-listnav.js" ></ script > < link rel = "stylesheet" href = "listnav.css" > |
代码列表:
1 | < ul id = "myList" >...</ ul > |
关联插件对应id
1 2 3 | <script> $( "#myList" ).listnav(); </script> |
选项
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | $( "myList" ).listnav({ initLetter: '' , // filter the list to a specific letter on init ('a'-'z', '-' [numbers 0-9], '_' [other]) includeAll: true , // Include the ALL button incudeOther: false , // Include a '...' option to filter non-english characters by includeNums: true , // Include a '0-9' option to filter by flagDisabled: true , // Add a class of 'ln-disabled' to nav items with no content to show removeDisabled: false , // Remove those 'ln-disabled' nav items (flagDisabled must be set to true for this to function) noMatchText: 'No matching entries' , // set custom text for nav items with no content to show showCounts: true , // Show the number of list items that match that letter above the mouse cookieName: null , // Set this to a string to remember the last clicked navigation item requires jQuery Cookie Plugin ('myCookieName') onClick: null , // Set a function that fires when you click a nav item. see Demo 5 prefixes: [], // Set an array of prefixes that should be counted for the prefix and the first word after the prefix ex: ['the', 'a', 'my'] filterSelector: '' // Set the filter to a CSS selector rather than the first text letter for each item }); |
特别申明:
本站所有资源都是由网友投稿发布,或转载各大下载站,请自行检测软件的完整性!
本站所有资源仅供学习与参考,请勿用于商业用途,否则产生的一切后果将由您自己承担!
如有侵权请联系我们删除下架,联系方式:lei1294551502@163.com