#19534 closed enhancement (duplicate)
Scroll to top on Toolbar click
Reported by: | ericmann | Owned by: | ericmann |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.3 |
Component: | Toolbar | Keywords: | has-patch needs-testing |
Focuses: | Cc: |
Description
Google+ introduced a fantastic feature with their toolbar. If you're scrolled far down a page, clicking any non-link in the toolbar automatically scrolls back to the top of the page.
When viewing a very long WordPress front-end (or a long list of comments/large settings page on the WordPress back-end), this would be a fantastic tool. It's also better to have a consistent UX control built in to the system rather than the various spin-your-own hacks different developers have built over the years.
I propose we add this "back to top" functionality to the WordPress toolbar. It should necessarily work with or without jQuery (in situations where themes don't enqueue jQuery on the front-end but still display the toolbar).
Attachments (1)
Change History (6)
#1
@
13 years ago
- Keywords has-patch needs-testing added
This patch adds a very basic scrollTop animation on a jQuery hook (the click event on the toolbar). It also adds a smooth, non-jQuery animation to the onclick event of the toolbar. Target ID filtering is used to eliminate capturing clicks on actual buttons/dropdowns in the toolbar as well.
#3
@
13 years ago
Love this :)
I keep expecting this sort of thing to work everywhere there's a fixed header/toolbar, including twitter (where -sadly- it doesn't work)
Add a back-to-top function for both the jQuery and non-jQuery parts of the toolbar script.