PDA

View Full Version : Mini Mods - [YUI] VSQ - Scroll To Top


mad@Max
06-01-2010, 10:00 PM
Title: VSQ - Scroll To Top
Compatibility: 3.8.х - 4.0.х (ie, opera, firefox, chrome, safari)
Description: able to add a button at the bottom right of the screen by pressing which occurs smoothly move to top, with animation effect:)

Install:

Extract content of archive to forum folder.
At the bottom of the template headinclude add
<script type="text/javascript" src="clientscript/yui/animation/animation-min.js"></script>
<script type="text/javascript" src="clientscript/vsqscrolltotop.js"></script>
If the script animation already exist, so don't include it.
Set the button style in a file (image, size, position, etc.).


DEMO:
http://mixplay.ru/test/forum.php

Daniel_HBK
06-02-2010, 10:01 AM
Nice! , installed

snakedevil
06-02-2010, 05:47 PM
Great Thanks :)

lubbie
06-02-2010, 06:54 PM
Very Nice. Thanks

Seems there is an Error. After first time installation and restart of the forum its displayed also if u are on top of the page

Just found out that this Tab is displayed if u change from CMS -> Forum or Forum -> CMS etc...

RobbieZ
06-02-2010, 08:07 PM
Excellent. Installed.

Where is the image coming from? Id like to do my own :D

mad@Max
06-02-2010, 08:27 PM
In vsqscrolltotop.js
...
background = "url(http://mixplay.ru/images/up1.png) no-repeat scroll 0% 0% transparent";
...

BlackJacket
06-04-2010, 12:02 AM
ok that is awesome! Tagged for later.

Inflikted
06-05-2010, 03:50 PM
is there a way to get rid of the bouncing up top? and simply have it scroll to the top

Jesh
06-05-2010, 04:37 PM
is there a way to get rid of the bouncing up top? and simply have it scroll to the top

To remove the 'bounce', edit the .js file, find this line

var scroll = new Y.Scroll(document.getElementsByTagName((YAHOO.env. ua.webkit ? "body" : "html"))[0], {scroll: {to: [0, 0]}}, 3.5, Y.Easing.bounceOut);

change Y.Easing.bounceOut to 0.

var scroll = new Y.Scroll(document.getElementsByTagName((YAHOO.env. ua.webkit ? "body" : "html"))[0], {scroll: {to: [0, 0]}}, 3.5, 0);

Jesh
06-05-2010, 04:40 PM
Also, to change speed, change the 3.5 to any number. Higher the slower.

karlm
06-06-2010, 01:37 AM
This is class!!!! I've not installed it, but it is funky nonetheless.

goxy63
06-12-2010, 06:22 PM
СПАСИБО
Works just fine, nominated rated and yesss installed :D

docvader
06-12-2010, 11:06 PM
Excellent!

Mo7mD.ZaYOnA
06-21-2010, 01:53 PM
very good

sadiq6210
06-21-2010, 03:01 PM
Awesome .. Installed

Scitz0
06-21-2010, 04:47 PM
Worked great... thanks!

Hell Bomb
08-04-2010, 07:22 AM
is their anyway to add this to just normal go to top button? like the one at the bottom of the page? I would much rather i do that instead :)

masterweb
08-04-2010, 03:29 PM
Wow i installed it in just 2 minutes and works great!, thanks bud marked as installed :D

BadgerDog
08-31-2010, 04:02 PM
To remove the 'bounce', edit the .js file, find this line

var scroll = new Y.Scroll(document.getElementsByTagName((YAHOO.env. ua.webkit ? "body" : "html"))[0], {scroll: {to: [0, 0]}}, 3.5, Y.Easing.bounceOut);

change Y.Easing.bounceOut to 0.

var scroll = new Y.Scroll(document.getElementsByTagName((YAHOO.env. ua.webkit ? "body" : "html"))[0], {scroll: {to: [0, 0]}}, 3.5, 0);

Changed this to 0 as suggested and still getting bounce in v4.04pl1? :confused:

Thanks .. :)

Regards,
Badger

lubbie
08-31-2010, 07:13 PM
Nice Gadget. Installed. Thanks

superchizo
09-09-2010, 07:58 PM
excellent! thank you very much

BadgerDog
09-09-2010, 08:25 PM
Un-installed... thanks anyway ...

Couldn't get bounce at top to stop ....

Regards,
Badger

Sforums
04-03-2011, 02:58 PM
Good stuff, very useful to me. Intalled and rated.
mad@max, can you make one from top to bottom too? My forum is bit long and it would help a lot.

Eric
04-27-2011, 09:23 AM
Un-installed... thanks anyway ...

Couldn't get bounce at top to stop ....

Regards,
Badger

Old post but you should be able to edit /clientscript/vsqscrolltotop.js

Find:

var scroll = new Y.Scroll(document.getElementsByTagName((YAHOO.env. ua.webkit ? "body" : "html"))[0], {scroll: {to: [0, 0]}}, 3.5, Y.Easing.bounceOut);


Replace with:

var scroll = new Y.Scroll(document.getElementsByTagName((YAHOO.env. ua.webkit ? "body" : "html"))[0], {scroll: {to: [0, 0]}}, 3.5, Y.Easing.easeNone);


Notice what changed is in red.

Descriptions/options for Y.Easing.??


easeIn
Begins slowly and accelerates towards end. (quadratic)

easeNone
Uniform speed between points.

easeOut
Begins quickly and decelerates towards end. (quadratic)

parrots
05-06-2011, 02:47 PM
Can get it to work on the forum homepage but not any of the others?
Any suggestions - it shows up on all pages but doesn't scroll back to the top.

UKCE_Hitman
05-07-2011, 12:42 PM
Thx installed

nacaruncr
06-27-2011, 05:52 AM
installed + tagged + 5 stars :D
thanks :D awesome :D

Popa Andrei
07-14-2011, 10:36 AM
besti thing ever :D

FReeSTER
07-24-2011, 03:11 PM
thank you mate this is sick. lol

swiftor
10-11-2011, 07:20 AM
This is great, any chance on providing guidance on how to perhaps have a button right next to it that sends a user back to the bottom of the page, or maybe the last post?

rob39
10-12-2011, 12:59 AM
Just to say Nice....it's working on my VB 4.1.4, so far....

Alecsmith
12-04-2011, 05:43 AM
Excellent working with Vb 4.1.7 :)

Popa Andrei
12-28-2011, 02:47 PM
change the line to
var scroll = new Y.Scroll(document.getElementsByTagName((YAHOO.env. ua.webkit ? "body" : "html"))[0], {scroll: {to: [0, 0]}}, 3.5, Y.Easing.easeNone);
but the bumbping didnt go away
www.elitegamers.co

Ricsca
02-10-2012, 12:32 PM
In vb 4.1.10 dont work...

Kraxell
02-10-2012, 12:37 PM
This works with all versions.

qubed
09-19-2012, 01:23 PM
Does this work with 4.2? I've installed it and made the template edits, but don't see it appearing in the default theme or my custom theme that I also made the template edits too. Just checking to find out if it's an issue on my end or indeed a version incompatibility.

Jackchan
12-17-2012, 10:15 PM
Installed on 4.2 and it work but I just want to have simple back to top button and remove the animation effect.

How can I do that? Thanks :)

sonictremila
03-02-2013, 08:07 AM
I love you! Installed.

franzes80
12-30-2013, 10:24 AM
Update this mod:
Work on vb 4.2.2
Insert new arrows and tested on vb 4.2.2

New demo
Demo (http://gamesonic.it/forum/forum.php)

tsolomon
02-11-2015, 08:58 AM
Hi,
Its working on 4.2.2 upd4 , but I have a problem. It shows every time when the page is loaded/reloaded. Scroll down/up and my button blinks several times and after that it is OK.

Interesting thing, I can see this button at the file attachment pop-up page /editor/.


http://rottweiler-club.com/forum.php

scripts:
http://rottweiler-club.com/clientscript/vsqscrolltotop.js
http://rottweiler-club.com/clientscript/yui/animation/animation-min.js

oldfan
04-13-2023, 05:41 PM
dont work n 4.2.6. php 7.2