Top
Home

Make List Alphabetical

This jQuery will take a list and turn it into a alphabetized index!



<script src="https://code.jquery.com/jquery-3.1.1.slim.min.js"></script>
<script src="https://idlesign.github.io/jquery-alphaindex/src/jquery.alphaindex.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script>
$(function() {
$('#btn-init').click(function () {
$(this).addClass('disabled').off('click');
var index = $('#my-list').makeAlphaIndex();
index.alphaIndexBar.addClass('list-inline');
});
});
</script>






<button id="btn-init" class="btn btn-primary">Make alphaindex</button>

<ul id="my-list">
<li>Kimdar</li>
<li>Tomara Mylo Gai</li>
<li>Wathmon Elthen</li>
<li>Mirayam Migorn</li>
<li>Eli</li>
<li>Ahanna Gibolt
<ul>
<li>aaaaTemil</li>
<li>bbbbbZigmal Updar</li>
<li>cccccDerik Elvar Fronar</li>
<li>ddddDrophar Achard</li>
</ul>
</li>
<li><a href="#">Grim Tibers</a></li>
<li>Lyna</li>
<li>Vilan</li>
<li>Tristan Modum</li>
<li>Temil</li>
<li>Zigmal Updar</li>
<li>Derik Elvar Fronar</li>
<li>Drophar Achard</li>
<li>Nymia</li>
<li>Zena Elidin Tibers</li>
<li>Ayne Drophar</li>
<li>Calina Teslanar</li>
<li>Rysdan</li>
<li>Yysdan</li>
<li>Akara</li>
<li>Rivatha</li>
<li>Meldin Sithik Relboron</li>
<li>Lahorn Uhrd</li>
<li>Ackmard Touck Ixen</li>
<li>Rivatha Vilan</li>
<li>Sevestra</li>
<li>Riss Cordale</li>
<li>Enoka Witfar Pendus</li>
<li>Useli Durmark Silpal</li>
<li><a href="#">Qidan Abdun Riss</a></li>
<li>Nymia Casdon</li>
<li>Amara Hecton Nildale</li>
<li>Efar Safize</li>
<li>Bolrock Wrathran Elson</li>
<li>Ipdorn Zerin</li>
<li>Andonna Eli</li>
<li>Colthan Casdon</li>

</ul>