javascript - Jquery get nth child of a matched row -


please see line prepend below.

$('#area_code').keyup(function(){          var searchterm = $(this).val();         if(searchterm.length > 3) {             var match = $('tr.data-row:contains("' + searchterm + '")');             var nomatch = $('tr.data-row:not(:contains("' + searchterm + '"))');             $('#sector1_result').prepend(match)             match.addclass('selected');             nomatch.css("display", "none");         } else {             $('tr.data-row').css("display", "");             $('tr.data-row').removeclass('selected');         }     }); 

this gets row table , appends it, want cell row , not entire row.

you can use combination of .children , .get or .eq. example if match jquery object containing row, nth child whith:

match.children().get(n) 

Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -