I have created a div with the class name 'top-page-content'. Inside this div, I added a script that is supposed to automatically change the background image of the div. Here is the code:
var bgArr = ["../images/unicorn-bg.jpg", "../images/twistter-bg.jpg"];
function backgroundSlide(i) {
$('.top-page-content').css("background", "url("+bgArr[i++]+")");
if (i == bgArr.length) i = 0;
var st = setTimeout(arguments.callee(i), 1000);
}
backgroundSlide(0)
</script>
However, it seems that the script is not functioning as expected. Can you help me identify the issue?