I have an HTML string from a Ajax loaded source. I would like to get some attributes from an object (image) in this string, before I put the HTML into the document.
I've got something like:
$.ajax({
url: uri+'?js',
success: function(data) {
var htmlCode = $(data).html();
$('#otherObject').html(data);
}
});
How can I get attributes (the src
for example) from this HTML string?