0

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?

1 Answer 1

1
$('.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...

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.