DeuxHuitHuit / quicksearch

A jQuery plugin for searching through DOM Elements quickly
https://www.npmjs.org/package/jquery.quicksearch
Other
135 stars 35 forks source link

Is there a way to run quicksearch on the current row and one row above or one row below? #45

Open MisterSnrub opened 3 years ago

MisterSnrub commented 3 years ago

I have a table with tr rows that alternate between class master and class detail, like this:

<table>
  <tr class="master">
  </tr>
  <tr class="detail">
  </tr>
  <tr class="master">
  </tr>
  <tr class="detail">
  </tr>
  <tr class="master">
  </tr>
  <tr class="detail">
  </tr>
</table>

When a search result is found in a tr "detail" row I want it to also return the previous "master" row, and when a search result is found in a tr "master" row I want it to also return the next row ("detail"), regardless of whether the search target appears in that row or not,

As it is now, I search a term and I get way too many 'detail" rows and my table looks totally messed-up.