Skip to content

Commit

Permalink
Fixed filtering to work with optgroup
Browse files Browse the repository at this point in the history
  • Loading branch information
Dario Javier Cravero (atlas) committed Nov 3, 2010
1 parent c2d214f commit 5cee8ff
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/jquery.multiselect.filter.js
Expand Up @@ -92,14 +92,13 @@
},

updateCache: function(){
var optiontags = this.element.children(),
isOptgroup = optiontags[0].tagName === "OPTGROUP" || false;
var optiontags = this.element.children();

this.cache = optiontags.map(function(){
var self = $(this);

// account for optgroups
if( isOptgroup ){
if( this.tagName === "OPTGROUP" ){
self = self.children();
}

Expand Down

1 comment on commit 5cee8ff

@hasokeric
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

Please sign in to comment.