So here is my app.js
$(document).ready(function() {
var cnt=0, bg;
var $body = $('body');
var arr = ['http://www.writerscentre.com.au/wp-content/uploads/2013/12/Writing-Picture-Books-grid.jpg','bg2.jpg','bg3.jpg','bg4.jpg','bg5.jpg','bg6.jpg'];
var anim;
var bgrotater = setInterval(function() {
if (cnt==5) cnt=0;
bg = 'url("' + arr[cnt] + '")';
cnt++;
$body.css('background-image', bg);
/* $body.animate({
background-image = bg;
},200)
*/
}, 1000);
});
the $body.css works fine but can i get this to work with .animate()
$body.animate({opacity:0}, 'slow', function() {$(this).animate({opacity: 1})})for fade effect