I have a html like below, Problem is that i want to find/select next div after this image and toggle its visibilty
<table>
<tr>
<td>
<img src="src" class="minmax" />
</td>
</tr>
</table>
<div class="minmaxdiv">
div contents
</div>
<table>
<tr>
<td>
<img src="src" class="minmax" />
</td>
</tr>
</table>
<div class="minmaxdiv">
div contents
</div>
each image have class="minmax" after its click must toggle the visibility of first div after itself.
first img tag must toggle the first div & the second must toggle the second tag.
for example i have tried $(".minmax:first").parents("table:first").nextUntil("div.minmaxdiv") but the result is empty jquery object
Try this:
Example fiddle