JS Style Switcher for BG Images
JS Style Switcher for BG Images
Out of context: Reply #4
- Started
- Last post
- 7 Responses
- noiseisthis0
var bgList = ["http://src.to.bg.com.jpg", "http://src.to.bg2.com.jpg",...]
$(document).ready(function(){
$("body").css("background", bgList[i]);
$("#button").click(function(){
i++
if(i>bgList.length) i=0;
$("body").css("background", bgList[i]);
});
}you need to dl jquery to do this ^^^^