forum

Home / DeveloperSection / Forums / How can I reference a html table cell td from a checkbox inside the cell using jquery?

How can I reference a html table cell td from a checkbox inside the cell using jquery?

Anonymous User 1896 20-Jan-2015

I have an html table:

  <table>
         <tr>
              <td>
                  <input type="checkbox" name="myCheck">
              </td>
         </tr>
  </table>

I want to change the backcolor of the table cell when i click on the checkbox. The table cell doesn't seem to be the parent of the checkbox.

What is the correct way to get a reference to the table cell on checkbox click?

 


Updated on 20-Jan-2015
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By