jQuery select child element by class with unknown path
$('#thisElement').find('.classToSelect')
will find any descendents of #thisElement
with class classToSelect
.
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.