How to convert a MooTools 'Scroll to Top' Script to jQuery
- by Vikram
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.