i am currently using this to get the url from the background-image property:
var url = $(this).find(\'div\').css(\'background-image\'); url = url.substr(4, u
You could do:
url = url.replace(/^url\(["']?/, '').replace(/["']?\)$/, '');
This will remove url(' and url(" from the beginning of the string if it is present and ") resp. ') from the end.
url('
url("
")
')