Advertisement
GWibisono

jquery scroll

Oct 25th, 2012
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.59 KB | None | 0 0
  1. <script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
  2. <div id='#body'>
  3. <div style='height:1999px;width:100px;background:red'></div>
  4. <input type=button class="goTop"  value='top'/><?=mktime();?>
  5. </div>
  6. <script>
  7. /*
  8. $(document).ready(function() { 
  9.     // Code that uses $'s $ can follow here.
  10.     $(".goTop").click(function (e)
  11.     {        
  12.          $('html, body').animate({scrollTop: '0px'}, 800)
  13.     });
  14. }) ;
  15. */
  16. $.noConflict();
  17.   jQuery(document).ready(function($) {
  18.     jQuery(".goTop").click(function (e)
  19.     {        
  20.          jQuery('html, body').animate({scrollTop: '0px'}, 800)
  21.     });
  22. });  
  23. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement