jquery - If div becomes larger then a specific height, make it static? -


i have div height controlled jquery. have script expands height ("show more"). problem is, div set position: fixed;, when expand enough content outside window, cant see it.

what jquery script makes div static , not fixed when expands outside window.

#left {     width: 250px;     height: auto;     margin-top: 167px;     position: fixed;     float: left;     } 

i have no idea how write this.

thanks in advance! have nice day.

edit: forgot, i'll post expand jquery function if needed, didn't think so.

something this:

$('#left').css('position', 'static'); 

or better:

$('#left').toggleclass('expanded'); 

with css:

#left.expanded {position: static;} 

demo: http://jsfiddle.net/wpuzm/


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -