Reputation: 21647
I have the following
$('.quickview-dialog-left').load('/productlargetest .productlargeimage a');
the href of this a tag is an image. And I want to use that url and add an image inside the quickview-dialog-left but the above only brings in the entire a tag.
How would I bring in the href of the a tag?
Upvotes: 0
Views: 741
Reputation: 28154
$('.quickview-dialog-left').load('/productlargetest .productlargeimage a');
$('.quickview-dialog-left').html("<img src='"+$('.quickview-dialog-left a').attr("href")+"'/>");
Side comment: loading a whole page seems like an overkill to just get an image...
Upvotes: 1