https://github.com/LuisGC/blog
Revision 17d7a0d31873783398506bc500cfa009e98d1a23 authored by LuisGC on 24 November 2018, 20:23:48 UTC, committed by LuisGC on 24 November 2018, 20:23:48 UTC
1 parent e9064c5
Tip revision: 17d7a0d31873783398506bc500cfa009e98d1a23 authored by LuisGC on 24 November 2018, 20:23:48 UTC
testing new image and build command
testing new image and build command
Tip revision: 17d7a0d
backToTop.js
$(function(){
// browser window scroll (in pixels) after which the "back to top" link is shown
var offset = 300,
//browser window scroll (in pixels) after which the "back to top" link opacity is reduced
offset_opacity = 1200,
//duration of the top scrolling animation (in ms)
scroll_top_duration = 700,
//grab the "back to top" link
$backToTop = $('#back-to-top');
$shareNav = $('#share-nav');
//hide or show the "back to top" link
$(window).scroll(function(){
if ($(this).scrollTop() > offset) {
$backToTop.fadeIn();
$shareNav.fadeIn();
} else {
$backToTop.fadeOut();
$backToTop.removeClass('btt-fade-out');
$shareNav.fadeOut();
}
if($(this).scrollTop() > offset_opacity) {
$backToTop.addClass('btt-fade-out');
}
});
//smooth scroll to top
$backToTop.on('click', function(event){
event.preventDefault();
$('body,html').animate({
scrollTop: 0 ,
}, scroll_top_duration
);
});
});
Computing file changes ...