jonline Posted February 18, 2010 Share Posted February 18, 2010 I need like an expand and collapse column, I believe i will need javascript to do it but am not sure. could anyone show me a script that shows more or less for example like the youtube description boxes. Quote Link to comment Share on other sites More sharing options...
andrewq2 Posted February 20, 2010 Share Posted February 20, 2010 Something like this should work. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <script type="text/javascript"> function hideElement(i) { var e = document.getElementById(i); if (e) { e.style.visibility = 'hidden'; } } function showElement(i) { var e = document.getElementById(i); if (e) { e.style.visibility = 'visible'; } } </script> <title>Test Page</title> </head> <body> <div id="showhide"> The Text<br/> <a href="java script:hideElement('showhide')">Hide</a><br/> </div> <p> <a href="java script:showElement('showhide')">Show</a><br/> </p> </body> </html> Quote Link to comment Share on other sites More sharing options...
jontyy Posted February 24, 2010 Share Posted February 24, 2010 jQuery could also be used for this i think. using their slideDown() and slideUp() functions. i have used a similar technique on one of my projects. slideDown(): slideDown slideUp(): slideUp Quote Link to comment Share on other sites More sharing options...
flybyme Posted August 9, 2010 Share Posted August 9, 2010 jQuery could also be used for this i think. using their slideDown() and slideUp() functions. i have used a similar technique on one of my projects. slideDown(): slideDown slideUp(): slideUp jQuery should work a treat! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.