Deep search in tables

Asked

Viewed 43 times

1

I need to look for a value , only I have a problem, I have to search in 3 different tables to find , and when I find I should direct the focus to the DIV where this table is. I can do this search with a table quietly, but with 3 tables in 3 different Ivs I’m not getting! Does anyone know a way to accomplish this search ? Thank you.

Follow a picture of my scenario, each tab has a table inside with the values. You need to fetch the value and talk about which table and div and also evidence this value.

inserir a descrição da imagem aqui Code of my simple search.

$(function(){
$(".input-search").keyup(function(){
    //pega o css da tabela 
    var tabela = $(this).attr('alt');
    if( $(this).val() != ""){
        $("."+tabela+" tbody>tr").hide();
          $("."+tabela+" td:contains-ci('" + $(this).val() +"')").parent("tr").show();
         } else{
        $("."+tabela+" tbody>tr").show();
       }
    }); 
   });
   $.extend($.expr[":"], {
    "contains-ci": function(elem, i, match, array) {
      return (elem.textContent || elem.innerText || $(elem).text() ||       "").toLowerCase().indexOf((match[3] || "").toLowerCase()) >= 0;
}
    });
  • 1

    Can you show us what you’ve been trying to do?

  • Yes, I will post the search code with a table , and an interface image also to better understand

  • I updated the question

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.