I have this function:
$("span.expandimg").click(function(){
$(this).nextAll(".toggle_container:first").slideToggle("slow");
});
This worked fine:
<span class="expandimg"><a href="#"><img id="iexpand" src="images/expand.png" border="0" /><img id="icollapse" src="images/collapse.png" border="0" /></a></span> <a href="asdfa" class="DSF">First Link</a>
<div class="toggle_container">
Some Text
</div>
But now I put "expandimg" inside the table column and "toggle_container" inside another column. Something like that:
<tr>
<td><span class="expandimg">......</td>
<td><div class="toggle_container">.....</td>
<tr>
How can I find the toggle_container element now? I want to click expandimg to expand toggle_container, but it does not work with the function that I have.
Thank!
source
share