Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

171
Vistas
Is there a way to run a JQuery quicksearch on the current row and one row above or one row below?

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');
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda