Javascript show multiple table rows from multiple select -


i code show multiple table rows depending on user selects in multiple select item. code shows last selected item reason, please me? code is:

if(list[x].selected) {                    $('table#newspaper-a tr:not(#header, #trweeknummer)').hide();     $('table#newspaper-a tr:not(#header, #trweeknummer)').each(function(){               $('td:nth-child(1)',this).each(function(){               if($(this).text() == list[x].value)                 $(this).parent(this).show();         });     });      } 

i have fixed problem myself, solution was:

$('table#newspaper-a tr:not(#header, #trweeknummer)').hide();  if(list[x].selected) {                $('table#newspaper-a tr:not(#header, #trweeknummer)').each(function(){           $('td:nth-child(1)',this).each(function(){           if($(this).text() == list[x].value)             $(this).parent(this).show();     }); });      

}


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -