Skip to content

Latest commit

 

History

History
29 lines (25 loc) · 636 Bytes

README.md

File metadata and controls

29 lines (25 loc) · 636 Bytes

Assorted

Vanilla JS Plugin for Sorting Everything

  1. Add script to HTML and create list resembling this HTML:
<script type="text/javascript" src="./dist/js/filtered.min.js"></script>
<ul class="assort-me">
  <li data-assorted="Name or Number Here"></li>
  <li data-assorted="Name or Number Here"></li>
  <li data-assorted="Name or Number Here"></li>
  <li data-assorted="Name or Number Here"></li>
</ul>
  1. Create a new instance of Assorted:
var assorted = new Assorted();
  1. Call the render method, passing arguments for assorted:
assorted.render({
  type: 'az',
  direction: 'asc'
});