jquery - expand div or UL based on content overflow -


how can make div expand when there lots of content within it?

html:

<div class ="content">     test <br />     test <br />     test <br />     test <br />     test <br />     test <br />     test <br /> </div><br /> <div class="click-here">click here see more</div> 

css:

div.content {     height:100px;     width:300px;     border:1px solid red;     overflow:hidden; }  div.click-here {     border:1px solid green;     width:200px; } 

here example: http://jsfiddle.net/nvcvy/1/

jquery or css?

would jquery scroll better solution? or display using css?

if expansion height , on click of button do:

​$('.click-here').click(function() {      $('.content').css('height', 'auto'); });​​​​​​​​​​​​​​​ 

http://jsfiddle.net/nvcvy/3/


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - EclipseLink JPA Object is not a known entity type -

java - Need to add SOAP security token -