I'm trying to do something like the following in jQuery
$('.container').siblings('.outerClass > .innerClass')
where I'm looking for:
<div class="container"></div>
<div class="outerClass">
<div class="innerClass">
find me!
</div>
</div>
I can't get the syntax right.
And another one (but this should work) (assuming you want to get the element with class innerClass
):
$('.container').siblings('.outerClass').children('.innerClass')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With