jQuery ListNav Plugin

Create a world of alphabetical navigation filters one list at a time!

Demo 4

Using cookieName to save last click and utilizing an onClick callback

$('#demoFour').listnav({
    cookieName: 'ln-demo5',
    onClick: function(letter) {
        $(".myLastClicked").text(letter.toUpperCase());
    }
});

If you include the jquery.cookie js file in your page before the listnav js file, you can set the cookieName option to have the listnav control remember your user's last clicked navigation item (the cookie value will be 'all', '_' for numbers 0-9 or a lowercase letter 'a' - 'z'). You can also use the onClick callback to fire a custom function when a letter gets clicked. Click a letter to see the onClick function, then reload the page and come back to Demo 5 and you'll see that the list loads your last clicked letter (obtained from the cookie value).

You Just Clicked: ?