-4

How can I extract the href- or src-link and store it as background-image?

enter image description here

Johnny Bones
  • 8,786
  • 7
  • 52
  • 117

1 Answers1

0

I don't know what you have tried and what are you extracted from, but you can use jquery to extract attribute value like href

var val = $(ELEMENT).attr("href");

and than using jquery apply the value to element

$(Element).css({background-image:url(val)});
Waqar Haider
  • 929
  • 10
  • 33