Skip to content
This repository has been archived by the owner on May 10, 2022. It is now read-only.

commadelimited/jQuery-Mobile-Tiny-Sort

Repository files navigation

jQuery Mobile Tiny Sort

A jQuery Mobile implemention of TinySort

Example

View a simple demo of jQuery Mobile Tiny Sort

Quick start

Clone the git repo - git clone [email protected]:commadelimited/jQuery-Mobile-Tiny-Sort.git - or download it

Usage & Documentation

jQuery Mobile Tiny Sort uses data attributes to sort data in your listviews. Every list item should have the same set of attributes, but the value can be whatever you choose. In the initialization code you provide a list of attributes along with their human readable name. The example uses firstname ("First Name"), and lastname ("Last Name"). The setup for firstname/lastname sorting would look like this.

$('#sortlist').jqmts({
	useNativeMenu: false, // use standard select menu, or enhanced
	showCounts: true, // shows a count of unique listview values or not
	className: 'jqmts', // allows the addition of an optional classname
	attributes: {firstname: 'First Name', lastname: 'Last Name'}
});

<ul data-role="listview" id="sortlist">
	<li data-sort-firstname="alana" data-sort-lastname="Midgley">Alana Midgley</li>
	<li data-sort-firstname="lonnie" data-sort-lastname="Wuest">Jaime Wuest</li>
</ul>

Contributing

You are invited to contribute code and suggestions to this project. The more the merrier.

Project Info

3rd party libraries required:

  • jQuery: MIT/GPL license
  • jQuery Mobile: MIT/GPL license

Custom bits:

Public domain

Bitdeli Badge

About

A jQuery Mobile implemention of TinySort

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published