I have this HTML structure
<img width="25" height="25" src=/data/apple_logo.jpg alt=Chocolate /> <input class="cake_checkboxes" style="vertical-align: bottom;" type="checkbox" name="option[232][]" value="23" id="option-value-23" /> <label for="option-value-23"> Chocolate</label> <br /> <div style='display:none;' class="quantity"> ......
If i do
$('.cake_checkboxes:first').next('div')
or
$('.cake_checkboxes:first').next('.quantity')
I get an empty value, but if I do
$('.cake_checkboxes:first').next().next().next()
I get the div I need ... any ideas on what is wrong, or if there is a way to turn down how the jquery closest moves
Trace source share