How to convert a MooTools 'Scroll to Top' Script to jQuery
Posted
by
Vikram
on Stack Overflow
See other posts from Stack Overflow
or by Vikram
Published on 2011-01-08T00:37:40Z
Indexed on
2011/01/08
0:54 UTC
Read the original article
Hit count: 209
Hello friends I have the following script in my Template:
window.addEvent('domready', function () {
var a = $('totop');
if (a) {
var b = new Fx.Scroll(window);
a.setStyle('outline', 'none').addEvent('click', function (e) {
new Event(e).stop();
b.toTop()
})
}
});
I wanted this in jQuery as I don't want to load 2 libraries just for this bit of script. I am actually very new to programming and still in the learning stage. Hence looking forward for some help on this issue.
Kindly Help.
© Stack Overflow or respective owner