var activeSlide = 1; var moveRight = true; var sliderWidth = 906; var dontSlide = false; var dotPressed = false; var slideSpeed = 600; var slideCount = ; $(document).ready(function(){ function slide(){ if(moveRight){ activeSlide++; if(activeSlide >= slideCount) moveRight = false; }else{ activeSlide--; if(activeSlide <= 1) moveRight = true; } bgAppearence(); } //Background appearence var bgImages = [ ] var nextBGimage = "uploads/images/featurebg3.png"; function bgAppearence(){ $( "#backgroundSlider" ).animate({ "opacity": 0 }, slideSpeed/2, function() { $("#backgroundSlider").css('background-image', 'url(' + bgImages[activeSlide-1] + ')'); $( "#backgroundSlider" ).animate({ "opacity": 1 }, slideSpeed/2, function() { }); }); $("#backgroundSlider").css('background-size', 'cover'); } });