To give a simplified example, I\'ve got the following block repeated on the page lots of times (it\'s dynamically generated):
&l
This will find the first parent with class box then find the first child class with regex matching something and get the id.
box
something
$(".mylink").closest(".box").find('[class*="something"]').first().attr("id")