From ab13971b6600869cda7cdc435910b90a6de87c05 Mon Sep 17 00:00:00 2001 From: roadhop Date: Fri, 22 Apr 2011 22:42:19 +0800 Subject: [PATCH] Minor change of event triggering from keyup to bind keyup change to allow filtering by both select boxes and text boxes. --- tablesorter_filter.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tablesorter_filter.js b/tablesorter_filter.js index 2e217ef..d24688c 100644 --- a/tablesorter_filter.js +++ b/tablesorter_filter.js @@ -222,7 +222,8 @@ // TODO: throw error for non-existing filter container? if(container.length) container[0].filterIndex = i; - container.keyup(function(e, phrase) { + // Changed from .keyup to allow for filtering by both select boxes and textboxes + container.bind('keyup change', function(e, phrase) { var index = this.filterIndex; if(undefined !== phrase) $(this).val(phrase); @@ -285,4 +286,4 @@ tablesorterFilter: $.tablesorterFilter.construct }); -})(jQuery); \ No newline at end of file +})(jQuery);