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

symfony - TEST environment only: The database schema is not in sync with the current mapping file -

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -