Javascript Question
- Started
- Last post
- 3 Responses
- insomnie
I have a fixed footer thats 50px tall, I want to be able to add additional 50px or so when the user scrolls all the way down to the end of the page.
Any quick solutions?
- dijitaq0
add an extra 50px bottom padding to the content div is probably your quickest solution
- oktalk0
How do people understand this shit. I have seen a tone of JavaScript related questions on here and they are all cryptic as hell.
Your question doesn't give enough information to provide an answer. Start Google searching "JavaScript detect page scroll" or look for a jQuery solution that will detect if the page has been scrolled to the bottom. Then you can add your extra pixels to the footer element.
- << it's because you have designers asking programming questions, basically.sublocked
- BabySnakes0
with jQuery something like this,
///////////
var newHeight = //your value
var endValue = // some value you know when the footer's scrollTop() will equal when you are at the bottom of the page.$(window).scroll(function () {
if($('#footer').scrollTop() >= endValue )
{
$('#footer').css('height', newHeight);
}
});- not tested but should put you on the right trackBabySnakes