Home
Web Front-end
JS Tutorial
Implementation code based on jquery to make ListNav compatible with Chinese pinyin sorting_jquery



Implementation code based on jquery to make ListNav compatible with Chinese pinyin sorting_jquery
May 15, 2018 pm 04:44 PM
Pinyin sorting
The rendering is as follows:


Copy the code The code is as follows:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>中文首字母排序</title> <link rel="stylesheet" href="css/listnav.css?7.1.34" type="text/css" media="screen" charset="utf-8" /> <script src="js/jquery-1.4.4.min.js?7.1.34" type="text/javascript"></script> <!--获取中文首字母的函数,需要jQuery支持--> <script src="js/jquery.charfirst.pinyin.js?7.1.34" type="text/javascript"></script> <!--ListNav是一个用于创建按字母顺序分类导航的jQuery插件。--> <script src="js/jquery.listnav.min-2.1.js?7.1.34" type="text/javascript"></script> <script type="text/javascript"> $(function() { $('#myList').listnav({ includeOther: true, noMatchText: '没有内容', prefixes: ['the', 'a'] }); }) </script> </head> <body> <p id="noticeMSG"> <label>中文字母序:</label> </p> <br /> <!--显示字母序的层。注:此层id必需是ul的id+"-nav"--> <p id="myList-nav"> </p> <!-- 兼容IE6 加clear:both;--> <ul id="myList" style="clear:both;"> <li><a href="https://www.jb51.net" target="_blank">123</a></li> <li><a href="https://www.jb51.net" target="_blank">aaaaaa</a></li> <li><a href="https://www.jb51.net" target="_blank">四川大学</a> </li> <li><a href="https://www.jb51.net" target="_blank">四川师范大学</a></li> <li><a href="https://www.jb51.net" target="_blank">成都大学</a> </li> <li><a href="https://www.jb51.net" target="_blank">成都理工</a> </li> <li><a href="https://www.jb51.net" target="_blank">电子科大</a> </li> <li><a href="https://www.jb51.net" target="_blank">西南科大</a> </li> <li><a href="https://www.jb51.net" target="_blank">西南财大</a> </li> <li><a href="https://www.jb51.net" target="_blank">四川音乐学院</a></li> <li><a href="https://www.jb51.net" target="_blank">中国</a> </li> <li><a href="https://www.jb51.net" target="_blank">你可以动态加载这些内容</a></li> <li><a href="https://www.jb51.net" target="_blank">Renner整理</a></li> <li><a href="https://www.jb51.net" target="_blank">jb51.net</a></li> </ul> </body> </html>
Copy after login
P.S:
jQuery ListNav Plugin
ListNav is a jQuery plug-in for creating alphabetical navigation.
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

Hot Article
Repo: How To Revive Teammates
3 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌
How Long Does It Take To Beat Split Fiction?
3 weeks ago
By DDD
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌

Hot tools Tags

Hot Article
Repo: How To Revive Teammates
3 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌
How Long Does It Take To Beat Split Fiction?
3 weeks ago
By DDD
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Replace String Characters in JavaScript

Custom Google Search API Setup Tutorial

8 Stunning jQuery Page Layout Plugins

Improve Your jQuery Knowledge with the Source Viewer

10 Mobile Cheat Sheets for Mobile Development
