I am trying to move the background image of a division by means of jquery animation and it is not moving .The image merely shakes when I try to move it . I want to create a slideshow and want the background image to move ,lets say on click ,I want the background image to occupy the full division and then on click it should maintain its size and move towards right or left .Please check the code here http://jsfiddle.net/sSYKD/1/
<!DOCTYPE html>
<html>
<head>
<script src="jquery-1.8.js"></script>
<style>
.blueScreen {
background:url(http://s21.postimg.org/quy8jsc0n/blue_Screen.png);
background-size:100% 100%;
width:100%;
height:500px;
}
.contentBlueScreen {
display:inline-block;
color:white;
background:url(http://i.imgur.com/a5m0HGp.png);
background-size:100% 100%;
width:100%;
height:500px;
}
</style>
<script>
$(document).ready(function() {
$("#theButton").click(function() {
$(".contentBlueScreen").animate({backgroundPosition:"200%"},3000);
});
});
</script>
</head>
<body>
<div class="blueScreen">
<div class="contentBlueScreen">
<button id="theButton">MOve it</button>
</div>
</div>
</body>
</html>