I'm parsing through a web page and I need to return every single attribute VALUE (note: not element) of any element tagged with a specific attribute.
A page example is below. The structure and ordering will vary from page to page, but I'm focused on only returning the value of each instance of attrX (red, blue, green, purple, etc)
<div attrX="red"></div>
<div attrX="blue"></div>
<span attrX="green></span>
<div>
<p attrX="purple"></p>
</div>
how can I use jQuery to return an array of the value for each instance on the page of the attribute 'attrX' in the following format (order doesn't actually matter)?
[0]->"red"
[1]->"blue"
[2]->"green"
[3]->"purple"
Thanks!