From e3daade83f1fc667899d6ebeae004fa158b93ec8 Mon Sep 17 00:00:00 2001 From: YujiSoftware Date: Fri, 15 Mar 2013 23:34:20 +0900 Subject: [PATCH 1/2] Remove the process is called two times. It is already called. (this.cache() -> this.go() -> this.results(true/false), this.stripe(), this.loader(false)) --- jquery.quicksearch.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/jquery.quicksearch.js b/jquery.quicksearch.js index 543d828..f1fca1b 100644 --- a/jquery.quicksearch.js +++ b/jquery.quicksearch.js @@ -160,9 +160,6 @@ }; this.cache(); - this.results(true); - this.stripe(); - this.loader(false); return this.each(function () { From 2d9b4823fafaeabbb4cfd8b62f14bb4a3ba63804 Mon Sep 17 00:00:00 2001 From: YujiSoftware Date: Fri, 15 Mar 2013 23:38:49 +0900 Subject: [PATCH 2/2] Delete a variable with the same meaning. --- jquery.quicksearch.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/jquery.quicksearch.js b/jquery.quicksearch.js index f1fca1b..8317ce3 100644 --- a/jquery.quicksearch.js +++ b/jquery.quicksearch.js @@ -38,21 +38,19 @@ var i = 0, numMatchedRows = 0, - noresults = true, query = options.prepareQuery(val), val_empty = (val.replace(' ', '').length === 0); for (var i = 0, len = rowcache.length; i < len; i++) { if (val_empty || options.testQuery(query, cache[i], rowcache[i])) { options.show.apply(rowcache[i]); - noresults = false; numMatchedRows++; } else { options.hide.apply(rowcache[i]); } } - if (noresults) { + if (numMatchedRows == 0) { this.results(false); } else { this.results(true);