I am trying to figure out the syntax for selecting a nth-child of an element by its class, however I don't know the exact path to the element. I can't do $('parent > child > grandchild > hereIam');
So basically I need to be able to say
$('#thisElement').AllRelativesWithClass('.classToSelect')
How exactly do I do that?
According to this documentation, the find method will search down through the tree of elements until it finds the element in the selector parameters. So $(parentSelector).find(childSelector)
is the fastest and most efficient way to do this.