I'm sure it's pretty easy, but I just can get it to work.
I have the following structure:
<div class="row forWidget"></div>
<div class="droppable"></div>
I have the first element in my jQuery object.
$widget = $('div.row');
And I want to .find() the element div.droppable from there.
How do I achieve this?
I thought it would be .next(), but it seems to only match real siblings.
You serach for the .next()
var next = $('div.row').next();
http://api.jquery.com/next/
From jQuery site
Get the immediately following sibling of each element in the set of matched elements. If a selector is provided, it retrieves the next sibling only if it matches that selector.
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