SyntaxFix
Write A Post
Hire A Developer
Questions
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")