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>
Using the jQuery quicksearch plugin, if a search result is found in a tr "detail" row I want it to also return the previous "master" row, and if 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" row matches without their corresponding "master" rows and as a result my table looks totally messed-up.
UPDATE: Here is more information about jQuery Quicksearch:
https://www.npmjs.com/package/jquery.quicksearch
And here is my actual code:
$js_quicksearch_call = <<<JAVASCRIPT
jQuery(document).ready(
function() {
jQuery( "input#tb-search" ).quicksearch(
"table tbody tr"
);
}
);
JAVASCRIPT;
drupal_add_js($js_quicksearch_call, 'inline');