<form action="blah">
<table>...</table>
<table>
<tr>...</tr>
<tr>
<td>...<td>
<td> **some text that changes** </td>
Given the above html structure, how do i get the text that changes , using jQuery
So i want jquery to search like this:
-look for form that has atrribute action=”blah”
-select the 2nd table of the form
-select the 2nd row (tr) of the table
-select the 2nd cell (td) of the row
-give me the text
This will help me greatly understanding jquery… i’m new to it.
Something like $(‘form[action=”blah”]’).tables(2).rows(2).cells(2).text but this is not a valid jquery match
So you want the second table cell in the second table row of the second table? The
eqfunction can make this easyDEMO
Also note that you didn’t close this table cell correctly:
should be
EDIT
If there are other tables on the page, and you want to make sure you get the second on in the form, then add the form to your selector: