I have an array with some HTML in it, so something like:
var array=[
"<div anAttribute=19 class='foo'>This is the content of the foo div.</div>",
"<div anAttribute=14 class='bar'>This is the content of the bar div.</div>"
];
I want to get the value of anAttribute for both of them.
array[0].$('.foo').attr("anAttribute");
Would return 19.