javascript - When using scroll Top, if footer disappears, add class to it -


when user scrolls top , footer hides, detect , add class make visible setting position fixed in css class. when footer hide, page blinks, css class added , removed in few milliseconds. how fix page doesn't blink? thank you.

if($(window).scrolltop() + $(window).height() < ($(document).height() - $(selector).outerheight())) {     $(selector).addclass("stickybottom");; } else {     $(selector).removeclass("stickybottom"); } 


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -