diff options
author | zhixin <wenzhixin2010@gmail.com> | 2015-11-24 16:46:04 +0800 |
---|---|---|
committer | zhixin <wenzhixin2010@gmail.com> | 2015-11-24 16:46:04 +0800 |
commit | 868d9f118dcfce63f781f537ff12ea482b5f507b (patch) | |
tree | 19b427a67a5f4fd4334fed21148ee4e702f7b2d5 | |
parent | aa06bb62b397ad6eef3076bf5e6322e7dae2e4d5 (diff) | |
download | multiple-select-868d9f118dcfce63f781f537ff12ea482b5f507b.zip multiple-select-868d9f118dcfce63f781f537ff12ea482b5f507b.tar.gz multiple-select-868d9f118dcfce63f781f537ff12ea482b5f507b.tar.bz2 |
Fix filter bug.
-rw-r--r-- | jquery.multiple.select.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/jquery.multiple.select.js b/jquery.multiple.select.js index 545a28d..627a57d 100644 --- a/jquery.multiple.select.js +++ b/jquery.multiple.select.js @@ -96,6 +96,8 @@ var that = this, $ul = $('<ul></ul>'); + this.$drop.html(''); + if (this.options.filter) { this.$drop.append([ '<div class="ms-search">', @@ -121,7 +123,7 @@ $ul.append(that.optionToHtml(i, elm)); }); $ul.append(sprintf('<li class="ms-no-results">%s</li>', this.options.noMatchesFound)); - this.$drop.html('').append($ul); + this.$drop.append($ul); this.$drop.find('ul').css('max-height', this.options.maxHeight + 'px'); this.$drop.find('.multiple').css('width', this.options.multipleWidth + 'px'); |