jquery - Increase DIV height with scrolldown up to a limit -


in page vertically stacked sections, 1 of these sections contains jquery accordion.

example

the first accordion ul (green in picture) $(window).height()-constantpixels, accordion takes 100% of available height. (red box represents browser window). means part of ne hidden.

so i'm trying accomplish start increasing green ul's height when scrolling down, until green content visible. suggestions? thank you

if share code can better, here's general idea.

you can listen scroll event of browser, , set height dynamically specific div. this:

$(document).scroll(function(e){     var currentheight = $('#greendiv').height();     $('#greendiv').height(currentheight + $(document).scrolltop()); }); 

something that. you're looking for?


Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -