[Bugs] Fading
-
Hi there,
I used the fading option to hide/show the button after a certain scroll offset.
This function has two major bugs. (I deactivated the min.js versions to test and fix them.)
wpfront-scroll-top/js/wpfront-scroll-top.js
Line 61 to 64container.stop().fadeTo(data.button_fade_duration, 0, function () { container.hide(); mouse_over = false; });
The hide function bugs the fadeOut effect at the end of it’s process a bit for me, because it seems that the complete-function will be called shortly before the duration is over. Some overlapping seems to occur. Finally the display-value is hidden, but the opacity-value is still the adjusted one. That’s kinda strange, but more strange is, that this happens too, by replacing the fadeTo function through fadeOut. :-///
Line 86
container.stop().css("opacity", mouse_over ? 1 : data.button_opacity).show();
The button will never fadeIn with this line of code! First of all, if the scroll offset is about to show the button, the mouse_over never can be true, because it’s hidden. Second; you put the opacity directly to the adjusted setting without fading in. ??
Line 86 should look like this to fade in:
container.stop().fadeTo(data.button_fade_duration, data.button_opacity, function () { mouse_over = false; });
- The topic ‘[Bugs] Fading’ is closed to new replies.