Skip to content

Commit

Permalink
fix up plugin chainability
Browse files Browse the repository at this point in the history
  • Loading branch information
lachie committed Dec 20, 2010
1 parent cdf4aad commit d7fa849
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/jquery.sifter.js
Expand Up @@ -3,17 +3,18 @@
//
(function($) {


var opts, container, groups, filters;


$.fn.extend({
filterList: function(options) {
opts = $.extend({}, $.fn.filterList.defaults, options);
if (this.length) {
return this.each(setup);
}
return this.each(setup);
},
updateActiveFilters: updateActiveFilters
});


$.fn.filterList.defaults = {
selector: 'li a',
Expand Down Expand Up @@ -157,9 +158,7 @@
$.fn.extend({
filteredList: function(options) {
opts = $.extend({}, $.fn.filteredList.defaults, options);
if (this.length) {
return this.each(setup);
}
return this.each(setup);
},
setActiveFilters: setActiveFilters,
getActiveFilters: getActive,
Expand Down

0 comments on commit d7fa849

Please sign in to comment.