Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Regina Cendrakasih
1,654 PointsHide Div when reach 100px height from the bottom
Can someone help me how to hide div when I reach 100px from the bottom of body?
here's my script:
var menu = $(".sticky-box");
$(window).scroll(function(){
//more then or equals to
if($(window).scrollTop() >= 1300 ){
menu.show();
}
else if($(document).height() <= ($(window).height() + $(window).scrollTop())) {
menu.hide();
}
});
1 Answer
Hugo Paz
15,622 PointsHi Regina,
You are talking about the white menu bar , with projects, all creative fields and so on?
Regina Cendrakasih
1,654 PointsRegina Cendrakasih
1,654 PointsHi Hugo,
Not the white menu bar, I mean the sticky while you click project and then show pop up detail, I want the sticky sidebar like that. Any suggest?