KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Using jQuery, how do you bind a click event to a table cell (below, class="expand" ) that will change the image src (which is in the clicked cell - original will be plus.gif, alternating with minus.gif) and hide/show the row immediately below it based on whether that row has a class of hide . (show it if it has a class of "hide" and hide if it does not have a class of "hide"). I am flexible with changing ids and classes in the markup. Thanks Table rows <tr> <td class="expand"><img src="plus.gif"/></td> <td>Data1</td><td>Data2</td><td>Data3</td> </tr> <tr class="show hide"> <td> </td> <td>Data4</td><td>Data5</td><td>Data6</td> </tr>
Tags (comma-separated)
Save Edits
Cancel