What could be the problem? The console shows me that the variable y
contains the right absolute path of an existing external image (direct linking enabled). After the background setting font color turns to red.
console.log("image url: "+y);
$(this).css("background","url('"+y+"') !important;");
$(this).css("color","red");
It does not work with background-image either.