jquery help, need expert solutions
I am trying to figure out how to use jquery for something like the following, here is what I want the script to do, before the page loads (DOM) I want the script to look on the page if there is a table row(tr) with a table data (td) with only a single number 1, 2, 3, or 4 like below then it will click the button whose number corresponds!
so in the example below there is 4 buttons each with values 1, 2, 3, and 4! notice that in the first td there is only a single number in it "4", so the script would have to click on the button which has the value of "4":
is this possible to do using jquery?
<tr>
<td width="33%" align="center" style="font-size:20px;">4</td>
<td width="33%" align="center"><form action="script.php" method="post">
<input type="submit" value="1" name="THIS IS RANDOM" style="font-size:5px;" class="button">
<input type="submit" value="2" name="THIS IS RANDOM" style="font-size:5px;" class="button">
<input type="submit" value="3" name="THIS IS RANDOM" style="font-size:5px;" class="button">
<input type="submit" value="4" name="THIS IS RANDOM" style="font-size:5px;" class="button">
</form></td>
</tr>