This code works properly in Firefox but not in Chrome, If you need more of the code I would be glad to provide it, a button changes a background image:
$(document).ready(function() {
var bg = 1;
$("#changePic").click(function () {
if (bg == 1)
{
$("#outerWrapper").css("background-image","url(images/background-lodge1.jpg");
bg=2;
}
else if (bg == 2)
{
$("#outerWrapper").css("background-image","url(images/background-lodge2.jpg");
bg=3;
}
else
{
$("#outerWrapper").css("background-image","url(images/background-lodge.jpg");
bg=1;
}
});
});
I’m not getting any errors in the Chrome Console. Thanks!
you are not closing the url for the background