I'm trying to save the background-image of a element, remove it and then maybe add it back later.
var current_bg_image = $("#div").css("background-image");
if(something){
$("#div").css("background-image", "none");
}else{
$("#div").css("background-image", current_bg_image); // not working...
}
The part where the background image is supposed to be added back doesn't work...
But if I change current_bg_image with "url(something.jpg)" it works. It seems that css() doesn't work with variables?