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

gcc - MinGW's ld cannot perform PE operations on non PE output file -

How to connect android app to App engine -

hadoop - Running Map Reduce Job shows error - Mkdirs failed to create /var/folders/ -