Find next class along?
Find next class along?
Hi all,
I am struggling to find out how to select the images based on the following code:
- <div class="content-1">
- <h3>Title</h3>
- <p class="instructions">blah blah</p>
- </div>
- <div class="content-2">
- <h3>Fixed</h3>
- <div class="field">
- <input type="checkbox" id="box11" class="toggle" /><h5>Delete this screen</h5>
- </div>
- </div>
- <div class="content-3 box11">
- <img id="thumb4" src="/images/doctors/thumb4.jpg" width="183" height="136">
- </div>
The code shows 3 divs grouped, my form has around 30 of these groups.
When the checkbox inside content-2 is selected I need to find any images inside the content-3 div and hide them.
I have this working currently by finding the box11 class and hiding all images, however this means I have to go through a massive form and name every class the same as the checkbox id.
Is there a way that when the checkbox is selected jQuery can find the next content-3 class and hide the images?
Thanks for help with this.