Open Milad-jfr opened 8 years ago
1.replace \stickUp-master\example\js\stickUp.js, 2.modify \stickUp-master\example\index.html 1) 2) topMargin: 'auto' ,footer: '#footer'
thanks its worked but the sticky element dissapier suddenly before footer comes and its not so nice and smooth. i want it to stop just before footer on its position and then start again on top side scrolling .
modify stickUp.js at last few lines:
if((varscroll + topMargin < vartop)||(varscroll + topMargin+ winHeight>varbottom)){
$('.stuckMenu').css("top",(varbottom-varscroll - topMargin- winHeight)+"px");
};
thanks to Following up this topic.
i replaced this code :
if((varscroll + topMargin < vartop)||(varscroll + topMargin+ winHeight>varbottom)){ $('.stuckMenu').css("top",(varbottom-varscroll - topMargin- winHeight)+"px"); };
with all this lines :
if((varscroll + topMargin < vartop)||(varscroll + topMargin+ winHeight>varbottom)){ $('.stuckMenu').removeClass('isStuck'); $('.stuckMenu').next().closest('div').css({ 'margin-top': currentMarginT + 'px'}, 10); $('.stuckMenu').css("position","relative"); };
now its works well in the bottom and its stop smoothly `before the footer but now the sticky element dissapier on the top of page !
sorry,i can't fully understand what you say:[but now the sticky element dissapier on the top of page !] would show me what you want on a picture? or mail to 632119457@qq.com
I want to stop sticky element at a certain Element. when user scroll the page down the element stop from scrolling on #footer. how can i do that ?