MyBB Community Forums

Full Version: Top button like Wordpress
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
For example, check Matt's site (which is actually a blog, whatever): http://mybbtutorials.com/
Go down, to the footer and click que the 'Top' button thingy. See the efect? Don't you think it awesome?

So, could someone make a plugin, modification.. whatever. Or teach me, I just want that, it's so nice. Maybe with JavaScript or PHP, eh idk (I suck at these, I actually don't know anything about it).. AJAX? Screw it, it is possible right?

So.. regards.
I so didn't know it did that :| That's really cool.
I think someone already made a tutorial on this.
Not sure if it's possible with Prototype, but probably can be done with Mootools and Scriptalicious.

Easy in jQuery though... damn Prototype's rapid rise to power...

$('#topbutton').click(function(){
$('html, body').animate({scrollTop:0}, 'normal');
});

Smile
@kan3: Nope, I checked every thread in the tutorials forum. Nothing found.
@Tomm: What do I do with that? ._.
//---

Actually, no... That should work but for some reason it doesn't... Undecided
Oh, yeah that just makes it go to the top in one go, on the link in the first post, it sort of glides up, not just jump straight to the top. It's probably in one of the .js files in the source.