Hello and welcome to our community! Is this your first visit?
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
    Sep 2010
    Thanked 0 Times in 0 Posts

    How to toggle displays?

    What is the technique used for making YouTube video descriptions drop down or come up (they expand or contract when you click the small white button with an arrow pointing up or down)?

    I'd like to have something similiar. A down arrow that when clicked, expands a div (I assume?) so the text can be read. The down arrow will change and become an 'up arrow' at this point. Then, when the up arrow is clicked, the div with the text contracts and the 'up arrow' becomes a 'down arrow'.

    I don't mind researching how to do it, it's just that I'm having troubles finding out what that technique is called so I can search online for tutorials, help, etc. I think it might be called toggling a display but I'm not sure.

  • #2
    Senior Coder
    Join Date
    Feb 2009
    Ilkley, West Yorkshire, UK
    Thanked 727 Times in 721 Posts
    Try googling javascript toggle caption. You need javascript for this sort of behaviour.


    Posting Permissions

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