Grafitti 0 Report post Posted April 22, 2007 Searching before posting my topic, i found this very helpful post. Javascript show + hideHowever, I'm still muddling around trying to fine tune it, and since i'm no good at coding, I'd appreciate any help.Using that example, how do I get the div text to be hidden on loading, rather than showing it all at page load.Also, is there a way to have the text change when clicked? so that for example, it would say "expand" when it's the small amount of text, and "collapse" when it's the full text? Share this post Link to post Share on other sites
pyost 0 Report post Posted April 22, 2007 For the DIV you want to be hidden completely right away, use display: none in your CSS file. As for the expand/collapse like, I guess you could use something like this: <a href=..... id=operation>Collapse</a>Then, in the code that expands and collapses the DIV you should add: document.getElementById("operation").innerHTML = "Expand";This way you will change the text to "Expand" after collapsing the DIV, and the opposite when expanding it Share this post Link to post Share on other sites
Grafitti 0 Report post Posted April 22, 2007 Thank you! Problem solved! Share this post Link to post Share on other sites
miCRoSCoPiC^eaRthLinG 0 Report post Posted April 23, 2007 Problem solved. Topic closed Share this post Link to post Share on other sites