Jul 26, 2014 in Layout 4518 views
Alphabetize is a jquery plugin that Categorizes data in alphabetical order
Source: github.com
1. INCLUDE JS FILES
<script type="text/javascript" src='js/jquery.js'></script> <script type="text/javascript" src='js/alphabetize.js'></script>
2. HTML
<ul class="alphabetize"> <li>Words</li> <li>Elements</li> <li> <b>Any</b> </li> <li> <div>Thing</div> </li> </ul>
3. JAVASCRIPT
$('.alphabetize').alphabetize();
4. OPTIONS
{ alphabets : upper || lower, showEmpty : true || false, emptyTemplate : null || <b>I am empty</b>, groupClass : 'alphabetGroup' || your class, alphabetClass : 'alphabet' || your class, groupValueClass : 'alphabetGroupElement' || your class, reverse : false || true, showUnknown : true || false }
5. REVERT
$('.alphabetize').alphabetize('destroy');
Tagged with:
alphabetize
categorize data
alphabetical order
alphabetical sort
alphabetical
categorize
jquery plugin
Related Articles