Reputation: 25
I have a div which is on the top of window and I made it as position:fixed,So when Im scrolling down it will stick to the window.I have button named as post.If I click on that button it will call a method activate.When ever I click that button I should go to the top of the page and activate the post.for this inside of the activate method I worte this method.Its working fine but not moving smothly to up
activate : function() {
window.scroll(0,0);
So I got with smoothscroll:(Its not working)
activate : function() {
window.addEvent('domready',function() {
new SmoothScroll({ duration:700 }, window);
});
Upvotes: 2
Views: 89