Get a free trial // Grow your CSS skills // Land your dream job

Cross-browser scroll-to-top

  • # December 25, 2012 at 4:22 pm

    Does anybody know a good javascript code for a cross-browser scroll-to-top?

    I want it to be where I click an itemselector and then the page scrolls directly to top.

    # December 25, 2012 at 5:33 pm

    This could be done without any js by giving id attribute to tag you want to go to (scroll to) and than refer that id in your href attribute.

    # December 25, 2012 at 5:56 pm

    Here are two of them

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed