Thread Locked This thread is locked - replies are not allowed.


This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 4 - Pages: 1 - Last Post: 17 May 21, 03:52 Last Post By: rfm2
rfm2

Posts: 68
Registered: 13-Dec-2007
Neptune - pagetop
Posted: 17 May 21, 00:02
 
In the interest of seeing if I could make the "scroll to top of page" option appear quicker, I finally discovered the function that causes the option to appear when the viewer scrolls down the page at least 400px. By changing that to 300 I can get the quicker appearance that I wanted. What I haven't figured out is what the 700 in the "fade in, fade out" portions of the function is controlling. In trying different values for the "700" it appeared that the option faded out when the viewer scrolled up to the same position as when it appeared in scrolling down. What am I missing about what the 700 is controlling?
JeffTucker

Posts: 8,362
Registered: 31-Jan-2006
Re: Neptune - pagetop
Posted: 17 May 21, 00:10   in response to: rfm2 in response to: rfm2
 
Had to think about that one for a moment. In the jQuery fadeIn() function, that controls the duration of the fade-in animation, in milliseconds. If it were zero, the up-arrow would appear instantly. If it were 2000, it would take a full two seconds to go from invisible to fully visible.

I use a lot of those kinds of animation tricks in my skins. It makes things feel smoother, and less abrupt. I don't like having elements of the page suddenly pop in and out of view, or snap instantly between two states (like the thumbnail "breathing" effect when you mouse over them).
rfm2

Posts: 68
Registered: 13-Dec-2007
Re: Neptune - pagetop
Posted: 17 May 21, 02:28   in response to: JeffTucker in response to: JeffTucker
 
Thanks for the usual quick, complete reply. It's interesting that I assumed (first mistake) that since the "400" referred to image pixels of down scrolling for the "top of page' option to appear, the "700" referred to up scrolling pixels to have the option disappear. Never occurred to me that the 700 referred to the rate of auto up scrolling. In my tests I always up scrolled manually to see where the up scrolling started or stopped. I used test values for the 700 of 300 to 2000. If I had watched the rate of auto up scrolling in those tests it should have been pretty obvious to me. I'll stick with the 700.

Thanks.
JeffTucker

Posts: 8,362
Registered: 31-Jan-2006
Re: Neptune - pagetop
Posted: 17 May 21, 02:31   in response to: rfm2 in response to: rfm2
 
It's not the rate of the scrolling that's involved. It's the rate at which the icon goes from invisible to visible. Set it to zero, and I think you'll see what I mean - when you get to the magic 300px, the up-arrow will suddenly appear on your screen, instead of smoothly fading in.
rfm2

Posts: 68
Registered: 13-Dec-2007
Re: Neptune - pagetop
Posted: 17 May 21, 03:52   in response to: JeffTucker in response to: JeffTucker
 
Thanks. Lesson learned, though slowly. I've got to stop making those assumptions. My correct guess to error ratio is probably less than 10%, but that won't dissuade me.
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums