For my One Page project, I want a DIV element to increase in height when scrolling down, but maintain that increased height when scrolling up.
Currently, I am utilizing JQuery with the code snippet below:
$(function(){
$(window).scroll(function() {
var $box = $('#content');
var scrollTopPos = $(this).scrollTop();
$box.height( scrollTopPos - 600 );
if( scrollTopPos == 0 ) {
$box.hide();
} else {
$box.show();
}
}).scroll();