Given i have a sample page that looks like this:
heading
Use something like this -
WORKING DEMO
var elements = $("body").find("[aria-controls='name1']");
Above is for if you want to look for elements within a container eg body in this case, it can be some div also.
--OR--
var elements = $("[aria-controls='name1']");
Above is for if you want to get all the elements with this attribute