View Full Version : How to toggle displays?

11-01-2010, 07:03 PM
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.

11-01-2010, 07:09 PM
Try googling javascript toggle caption. You need javascript for this sort of behaviour.