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

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -