Css Combination Of Relative+fixed Without Jump Effect
I want to give to the header-body the effect like in this site preview.oklerthemes.com/?theme=Porto Use a relative position (to show the scroll)...and the use the fixed.. but when
Solution 1:
Change your scroll value and it should get the behaviour you want : See this fiddle
$(window).scroll(function(){
if($(window).scrollTop() > 100){
$('.header-body').css('position','fixed').css('top','-100px');
} else {
$('.header-body').css('position','relative').css('top','0');
}
});
Post a Comment for "Css Combination Of Relative+fixed Without Jump Effect"