Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jul 2006
    Posts
    29
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Overflow Content Toggle

    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?

    thanks.

  • #2
    Regular Coder
    Join Date
    Feb 2005
    Posts
    679
    Thanks
    0
    Thanked 16 Times in 15 Posts
    Changing the height to auto should work:
    Code:
    <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>


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •