I want to fetch an URL-Attribute from a div and my code works perfectly find, except on Safari, where this line:
var url = $('.image').css('background-image').split('url("')[1].split('")')[0];
throws an Error, because the .split-function cannot be executed on an undefined object. Can somebody explain me why Safari does not like this code?