Like anyone else, I was struggling to get a simple 'Back to Top' button working in vBulletin 5. Some suggestions did work, but redirected me to the top of the homepage instead of the top of the current page.
I tried Wayne's Blog-post, but that didn't work. It ended up with a part of text on my site that didn't do anything. Modifying his code worked, but it was still in a strange place. Also the animation was ignored for some reason and I was unable to figure it out why. And to be honest I didn't care about the animation, I just wanted a simple back to top button.
After that I tried his other suggestion which can be found here. Also that option didn't work as expected. The animation was ignored and it took me every time to the top of the homepage (root).
So, together with our developer, we made a very, very simple but effective solution that actually works very well and looks nice. The only thing is it doesn't have any animation.
Here is how you do it:
I tried Wayne's Blog-post, but that didn't work. It ended up with a part of text on my site that didn't do anything. Modifying his code worked, but it was still in a strange place. Also the animation was ignored for some reason and I was unable to figure it out why. And to be honest I didn't care about the animation, I just wanted a simple back to top button.
After that I tried his other suggestion which can be found here. Also that option didn't work as expected. The animation was ignored and it took me every time to the top of the homepage (root).
So, together with our developer, we made a very, very simple but effective solution that actually works very well and looks nice. The only thing is it doesn't have any animation.
Here is how you do it:
- Login as Admin or an other account with Site Builder permission
- Enable 'Edit Site'
- Click 'Footer' in the top bar
- Click 'New Navigation Item'
- Name is 'Top'
- In 'Target URL' put the following: Code:
"#" onclick = "var s = window.location.pathname; window.location = s.replace('#','') + '#';return false;"
- Click 'OK'
- Click 'Save Changes'
- And you are done.
Comment