Mootools : Fx.Scroll moves page to top


/ Published in: JavaScript
Save to your folder(s)

Como hacer que el scroll de la página suba hasta arriba, para mostrar el principio de la página.
Requiere el plugin Fx.Scroll que no viene con el core de Mootools 1.2.


Copy this code and paste it in your HTML
  1. var scroller = new Fx.Scroll(document.body);
  2. $('link_to_top').addEvent('click', function(){
  3. scroller.toTop();
  4. }

Report this snippet


Comments


You need to login to view comments.