I’ve got a table and want to get an array of cell values which contain a query provided by the user.
For example, the user inputs ’20’, and the table is
120 240 220 110
I want an array to contain
[120, 220]
I currently have
var data_list = jQuery('td:contains('+seach_val+')','table#data');
and I’ve also tried the above with .text() to see if that would get me the text, but none of this seems to work.
Should be pretty simple I thought, but I’m having some trouble with this.
If you are looking to create an array, the following code works:
This outputs in the console:
http://jsfiddle.net/Mj5G4/4/