Posted By

esquareda on 12/29/08


Tagged

scroll javascript mootools fxscroll moo jump


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

enajenkins


[MooTools] Easy scroll to bottom


 / Published in: JavaScript
 

This clean little script assumes you have a simple "A-name" style jump to some cool stuff at the bottom of the page that you want people to see. ID your link "browse" and your good. Certainly you could scroll to another ID on the page if you are so inclined.

  1. <!-- the scripty script -->
  2.  
  3. <script type="text/javascript">
  4. window.addEvent("domready", function() {
  5. var scroll = new Fx.Scroll(window);
  6. $('browse').addEvent('click', function() {
  7. scroll.toBottom();
  8. });
  9. });
  10. </script>
  11.  
  12. <!-- sample html -->
  13.  
  14. <a href="javascript:void('false');" id="browse">Look at stuff below</a>

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: chlab on December 1, 2011

Used this for reference. Thanks.

You need to login to post a comment.