View Full Version : Overflow Content Toggle

07-15-2007, 02:09 AM
Hi, I'm looking for something that will allow me to toggle the display of overflow content.

For example: a section has a height of 50px and the content is more than 50px. Only 50px (in height) of content will show with the use of overflow:hidden . Is there a script that will let me have a link and so that when I click that link, the div section is expanded downwards to show the rest of the content?


07-15-2007, 04:18 AM
Changing the height to auto should work:
<a href="#" title="" onmouseover="document.getElementById('h').style.height = 'auto';" onmouseout="document.getElementById('h').style.height = '50px';">expand</a>
<div id="h" style="overflow: hidden; width: 50px; height: 50px;"> some text content some text content some text content some text content</div>