jQuery plugin to create alphabetical indexes for your lists
BSD-3-CLAUSE License
https://github.com/idlesign/jquery-alphaindex
jQuery plugin to create alphabetical indexes for your lists.
An alphabetical index may help your users to navigate through a long list of items.
Include jQuery
.
Include jquery.alphaindex.js
or jquery.alphaindex.min.js
.
Make a list:
<ul id="my-list">
<li>Joker James</li>
<li>Anderson Ann</li>
<li>Johnson John</li>
</ul>
var myIndex = $('#my-list').makeAlphaIndex(),
$indexBar = myIndex.alphaIndexBar; // bar object, if you need it
myIndex.alphaIndexToggle('a'); // toggle A indexed
myIndex.alphaIndexToggle(true); // show all
myIndex.alphaIndexToggle(false); // hide all
myIndex.alphaIndexToggle(); // toggle all
.alpha-index-list
..alpha-index-bar
..current
.