--- a/demo.html Fri May 10 20:31:49 2013 +0900
+++ b/demo.html Wed May 15 18:12:07 2013 +0900
--- a/jquery.lensy.js Fri May 10 20:31:49 2013 +0900
+++ b/jquery.lensy.js Wed May 15 18:12:07 2013 +0900
.addClass(this.settings.filterClass);
+ this.$filterWrap = $('<div>')
+ .addClass(this.settings.filterWrapClass)
this.$container = $('<ul>')
.addClass(this.settings.containerClass);
.addClass(this.settings.modalClass)
+ .append(this.$filterWrap)
.append(this.$closeButton)
this.$container.find('[data-original-value]').each(function() {
var value = $item.attr('data-original-value');
- if (self.settings.filterFn(self.$filter.val(), value, $item)) {
+ var text = $item.attr('data-original-text');
+ if (self.settings.filterFn(self.$filter.val(), value, text, $item)) {
closeButtonClass: 'lensy-button',
modalClass: 'lensy-modal',
filterClass: 'lensy-filter',
+ filterWrapClass: 'lensy-filter-wrap',
widgetClass: 'lensy-widget',
itemActiveClass: 'active',
itemFn: function(value, text) { return $('<span>').text(text); },
- filterFn: function(filterString, value) { return value.toLowerCase().indexOf(filterString.toLowerCase()) != -1; }
+ filterFn: function(filterString, value, text) { return text.toLowerCase().indexOf(filterString.toLowerCase()) != -1; }