I want to change the background image using slow animation, but its not working
$('body').stop().animate({background:'url(1.jpg)'},'slow');
Is there something wrong with the syntax!!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can get a similar effect by fading the image opacity to 0, then change the background image, and finally fading the image back in again.
This will require a div, behind everything else on your page which is as wide as the body.
You can make it as wide as the page using CSS:
And then animate it’s properties.
You could get more of a crossover effect, by having a second background div on top of this one, which you can then fade in.