Body background scrolling to the left - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:animate

Description

Body background scrolling to the left

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <script type="text/javascript" src="https://code.jquery.com/jquery-1.7.1.js"></script> 
  <style id="compiled-css" type="text/css">

body {/*from  w w w. j  av  a2 s.  c o m*/
   background-image: url(http://www.java2s.com/style/download.png);
}


      </style> 
  <script type="text/javascript">
    $(function(){
$("body").animate({backgroundPositionY : "500px"}, 2000);
    });

      </script> 
 </head> 
 <body>  
 </body>
</html>

Related Tutorials