Skip to content
This repository has been archived by the owner on Oct 18, 2023. It is now read-only.

Commit

Permalink
fixes #17 #19 #20 #21 #22
Browse files Browse the repository at this point in the history
  • Loading branch information
esteinborn committed Nov 3, 2014
1 parent 26d22a5 commit b490cf4
Show file tree
Hide file tree
Showing 12 changed files with 57 additions and 18 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,9 @@
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
});</code></pre>

# Showcase

The following websites are currently using ListNav to filter their lists:

[Santa Fe College](http://www.sfcollege.edu/az/)
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jquery-listnav",
"version": "2.4.8",
"version": "2.4.9",
"dependencies": {
"jquery": ">=1.3.2"
},
Expand Down
2 changes: 1 addition & 1 deletion css/listnav.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion demo/css/listnav.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 33 additions & 3 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ <h3>The default configuration</h3>
<li><a href="#">Yarn - Retail</a></li>
<li><a href="#">Yoga Instruction</a></li>
<li><a href="#">Youth Organizations &amp; Centers</a></li>
<li><a href="#">Zuul</a></li>
<li><a href="#">Zero</a></li>
<li><a href="#">Zilch</a></li>
</ul>
</div>
<div id="tabpage_2" class="tabContainer">
Expand Down Expand Up @@ -279,6 +282,13 @@ <h3>Override defaults and binding to multiple lists</h3>
<li><a href="#">Wines - Consultants</a></li>
<li><a href="#">Wines - Retail</a></li>
<li><a href="#">Woodworkers</a></li>
<li><a href="#">X-Ray - Apparatus &amp; Supplies (Manufacturers)</a></li>
<li><a href="#">Yarn - Retail</a></li>
<li><a href="#">Yoga Instruction</a></li>
<li><a href="#">Youth Organizations &amp; Centers</a></li>
<li><a href="#">Zuul</a></li>
<li><a href="#">Zero</a></li>
<li><a href="#">Zilch</a></li>
</ul>
<br>
<br>
Expand Down Expand Up @@ -341,6 +351,13 @@ <h3>Override defaults and binding to multiple lists</h3>
<li><a href="#">Wines - Consultants</a></li>
<li><a href="#">Wines - Retail</a></li>
<li><a href="#">Woodworkers</a></li>
<li><a href="#">X-Ray - Apparatus &amp; Supplies (Manufacturers)</a></li>
<li><a href="#">Yarn - Retail</a></li>
<li><a href="#">Yoga Instruction</a></li>
<li><a href="#">Youth Organizations &amp; Centers</a></li>
<li><a href="#">Zuul</a></li>
<li><a href="#">Zero</a></li>
<li><a href="#">Zilch</a></li>
</ul>
</div>
<div id="tabpage_3" class="tabContainer">
Expand Down Expand Up @@ -491,6 +508,13 @@ <h3>Using <code>cookieName</code> to save last click and utilizing an <code>onCl
<li><a href="#">Wines - Consultants</a></li>
<li><a href="#">Wines - Retail</a></li>
<li><a href="#">Woodworkers</a></li>
<li><a href="#">X-Ray - Apparatus &amp; Supplies (Manufacturers)</a></li>
<li><a href="#">Yarn - Retail</a></li>
<li><a href="#">Yoga Instruction</a></li>
<li><a href="#">Youth Organizations &amp; Centers</a></li>
<li><a href="#">Zuul</a></li>
<li><a href="#">Zero</a></li>
<li><a href="#">Zilch</a></li>
</ul>
</div>
<div id="tabpage_5" class="tabContainer">
Expand Down Expand Up @@ -606,6 +630,13 @@ <h3>Using the <code>includeOther</code> and <code>prefixes</code> options</h3>
<li><a href="#">Whittier Daily News</a></li>
<li><a href="#">Willits News</a></li>
<li><a href="#">Winters Express</a></li>
<li><a href="#">X-Ray - Apparatus &amp; Supplies (Manufacturers)</a></li>
<li><a href="#">Yarn - Retail</a></li>
<li><a href="#">Yoga Instruction</a></li>
<li><a href="#">Youth Organizations &amp; Centers</a></li>
<li><a href="#">Zuul</a></li>
<li><a href="#">Zero</a></li>
<li><a href="#">Zilch</a></li>
</ul>
</div>
<div id="tabpage_6" class="tabContainer">
Expand Down Expand Up @@ -706,14 +737,13 @@ <h2><a href="#">Worf</a></h2>
includeAll: false,
noMatchText: 'There are no matching entries.'
});
$('').listnav({
});
$('#demoThree').listnav({
initLetter: 'c',
includeNums: false
});
$('#demoFour').listnav({
cookieName: 'ln-demo5',
cookieName: 'cookie-demo',
includeAll: false,
onClick: function(letter) {
$(".myLastClicked").text(letter.toUpperCase());
}
Expand Down
8 changes: 4 additions & 4 deletions demo/js/jquery-listnav.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* Version 2.4.6 (10/07/14)
* Version 2.4.9 (11/03/14)
* Author: Eric Steinborn
* Compatibility: jQuery 1.3.x through 1.11.0 and jQuery 2
* Browser Compatibility: IE6+, FF, Chrome & Safari
Expand Down Expand Up @@ -105,7 +105,7 @@

var cookieLetter = $.cookie(opts.cookieName);

if ( cookieLetter !== null ) {
if ( cookieLetter !== null && typeof cookieLetter !== "undefined" ) {

opts.initLetter = cookieLetter;

Expand Down Expand Up @@ -281,7 +281,7 @@
}
return fullCount;
} else {
el = '.ln-' + $(el).attr('class');
el = '.ln-' + $(el).attr('class').split(' ')[0];

if (opts.dontCount) {
count = $list.find(el).not(opts.dontCount).length;
Expand Down Expand Up @@ -417,7 +417,7 @@
initLetter: '',
includeAll: true,
allText: 'All',
incudeOther: false,
includeOther: false,
includeNums: true,
flagDisabled: true,
removeDisabled: false,
Expand Down
3 changes: 3 additions & 0 deletions demo/js/tinynav.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion demo/scss/listnav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
}

.ln-last {
border-right:1px solid silver;
border-right: 1px solid silver;
}

a:hover,
Expand Down
8 changes: 4 additions & 4 deletions jquery-listnav.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* Version 2.4.6 (10/07/14)
* Version 2.4.9 (11/03/14)
* Author: Eric Steinborn
* Compatibility: jQuery 1.3.x through 1.11.0 and jQuery 2
* Browser Compatibility: IE6+, FF, Chrome & Safari
Expand Down Expand Up @@ -105,7 +105,7 @@

var cookieLetter = $.cookie(opts.cookieName);

if ( cookieLetter !== null ) {
if ( cookieLetter !== null && typeof cookieLetter !== "undefined" ) {

opts.initLetter = cookieLetter;

Expand Down Expand Up @@ -281,7 +281,7 @@
}
return fullCount;
} else {
el = '.ln-' + $(el).attr('class');
el = '.ln-' + $(el).attr('class').split(' ')[0];

if (opts.dontCount) {
count = $list.find(el).not(opts.dontCount).length;
Expand Down Expand Up @@ -417,7 +417,7 @@
initLetter: '',
includeAll: true,
allText: 'All',
incudeOther: false,
includeOther: false,
includeNums: true,
flagDisabled: true,
removeDisabled: false,
Expand Down
2 changes: 1 addition & 1 deletion listnav.jquery.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"navigation",
"filter"
],
"version": "2.4.8",
"version": "2.4.9",
"author": {
"name": "Eric Steinborn",
"email": "esteinborn@gmail.com"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "jquery-listnav",
"title": "jQuery ListNav",
"version": "2.4.8",
"version": "2.4.9",
"author": "Eric Steinborn",
"description": "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.",
"demo": "http://esteinborn.github.io/jquery-listnav",
Expand Down
2 changes: 1 addition & 1 deletion scss/listnav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
}

.ln-last {
border-right:1px solid silver;
border-right: 1px solid silver;
}

a:hover,
Expand Down

0 comments on commit b490cf4

Please sign in to comment.