Hello, I am trying to animate background images on my site, when a background image is selected I want it to slide in from the left and push the old background out of picture, can anybody help with the code as the stuff I have written does not work,
<script type="text/javascript">
$("a.background_btn").click(function(ev){
ev.preventDefault();
// alert("hello");
var url = $(this).attr("href");
// alert(url);
$.ajax ({
url : url,
type: "POST",
success : function (data) {
$('#wrapper').css('background', 'url(/media/uploads/backgrounds/'+(data)+')');
$('#wrapper').css('background-position', '-1000px 0px');
$('#wrapper').css('background-repeat', 'no-repeat');
$('#wrapper').animate({backgroundPosition: '0px 0px'})
}
})
});