I’m trying to find the closest previous sibling that has a class called hide.
Eg:
<div class="hide">A</div>
<div class="hide">B</div>
<div>C</div>
<div>D</div>
<div class="start">E</div>
I need the script to find B, but NOT A, when using .start as the starting point.
Here’s what I have so far
$('.start').prevUntil('.hide');
Of course that doesn’t work because prevUntil doesn’t include the selector once it’s found.
Hmm, I think I found an easy answer, just use the
:firstoption: