if my html is
<div style="background-image: url(http://domain.com/randompath/random4509324041123213.jpg);"></div>
And I get style attribute like..
var img_src = $('div').css('background-image');
So output is
url("http://domain.com/randompath/random4509324041123213.jpg")
Any regex or some basic thing to find image src/path 100% ? like
http://domain.com/randompath/random4509324041123213.jpg
100% I mean cross browser, It should work 100%
I not sure about output from var img_src = $('div').css('background-image'); has pattern like this in all browsers , If "yes" so I can do .replace()function
Playground : http://jsbin.com/apalat/1/edit
background-imageproperty?http://domain.com/randompath/random4509324041123213.jpg@Pekka웃background-image: url('http://domain.com/randompath/random4509324041123213.jpg');"with the URL surrounded by quotes? It is valid CSS to have quotes around a URL - they are optional in the specification.