stewartsims / jquery-listnav

Original plugin by iHWY. I fixed it so that its compatible with jQuery 1.4.X

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jQuery ListNav

Add a slick "letter-based" navigation bar to all of your lists. Click a letter to quicky filter the list to items that match that letter.

Updated for better compatibility with future jQuery versions. Original plugin by iHwy.

View the ListNav Demo

Simple Usage:

Insert into <Head>:

<link rel="stylesheet" href="listnav.css">

Code up your list:

<ul id="myList">...</ul>

Insert before </body>:

<script src="jquery-listnav-2.2.min.js"></script>
<script>
	$("#myList").listnav();
</script>

Available OPTIONS:

$("myList").listnav({
	initLetter: '',        // filter the list to a specific letter on init ('a'-'z', '-' [numbers 0-9], '_' [other])
    includeAll: true,      // Include the ALL button
    incudeOther: false,    // Include a '...' option to filter non-english characters by
    includeNums: true,     // Include a '0-9' option to filter by
    flagDisabled: true,    // Add a class of 'ln-disabled' to nav items with no content to show
    removeDisabled: false, // Remove those 'ln-disabled' nav items (flagDisabled must be set to true for this to function)
    noMatchText: 'No matching entries', // set custom text for nav items with no content to show
    showCounts: true,      // Show the number of list items that match that letter above the mouse
    cookieName: null,      // Set this to a string to remember the last clicked navigation item requires jQuery Cookie Plugin ('myCookieName')
    onClick: null,         // Set a function that fires when you click a nav item. see Demo 5
    prefixes: [],          // Set an array of prefixes that should be counted for the prefix and the first word after the prefix ex: ['the', 'a', 'my']
    filterSelector: ''     // Set the filter to a CSS selector rather than the first text letter for each item
});

About

Original plugin by iHWY. I fixed it so that its compatible with jQuery 1.4.X

License:MIT License


Languages

Language:CSS 67.3%Language:JavaScript 32.7%