earwig75
asked on
How can I get elements in jQuery with parent/child
I am writing some javascript tests and I would like to do the below using jQuery, $('.parent .child'); can someone assist?
"has at least 1 entry after loadFeed function is called"
"has at least 1 entry after loadFeed function is called"
it(".feed container has at least 1 entry", function(done) {
var numEntries = document.querySelector(".feed").getElementsByClassName("entry").length; //use jquery parent/child here
expect(numEntries).toBeGreaterThan(0);
done();
});
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Posted answer.
$'('element').parent().chi
$('element').siblings() will return all the children of the parent except this one.
Not really sure what you are asking?