I cant seem to be able set a background image with jQuery using css in web2py, I have been trying to create a background slide but all i am getting is white canvas!
I dont know why this is happening!
<script>
var images=new Array('images/fairytale.jpg','images/gamaila.jpg','images/gathuli.png');
var nextimage=0;
doSlideshow();
function doSlideshow(){
if(nextimage>=images.length){nextimage=0;}
$('.background')
.css('background-image','url("'+images[nextimage++]+'")')
.fadeIn(500,function(){
setTimeout(doSlideshow,1000);
});
}
</script>
Even a simple script such as this one cant do it, i'm suspecting there is something wrong with way i'm calling the images, the path i'm giving, please help
<script>
$(document).ready(function(){
$(".background2").css("background", "url(' ../images/background.jpg ')");
});
</script>
Regards;
Mostwanted