views:

24

answers:

2
            function set_preview_image(image_link){
                $('#slideshow-container').css("background-image", "url('files/images/store/content/templates/websites/preview_images/" + image_link + "'");
            }

I'm passing through an image variable. Everything works fine in FF and IE. What am I missing? I've already tried using backgroundImage instead, and not using quotes within the url line...

A: 

Have you tried putting // or ~/ in front of your url? I've found that can help

griegs
+1  A: 

try using wedkit's dev tools to see if why the background-image is not being applied.

BTW, it is not necessary to put a string param on url() and you missed a ) at the end.

function set_preview_image(image_link){
    $('#slideshow-container').css("background-image", "url(files/images/store/content/templates/websites/preview_images/" + image_link +")");
}
Reigel
Got it. Thanks for the help. You get a cookie.
dclowd9901