Say if I wanted to have an element to Show/Hide text in an Article what would I do and what would I edit?
1. <html>
2. <head>
3. <title>Untitled</title>
4. <script language="JavaScript">
5. function showAndHide(theId) {
6. var el = document.getElementById(theId);
7. var link = document.getElementById("moreLink");
8.
9. if (el.style.display=="none") {
10. el.style.display="block"; //show element
11. link.innerHTML = "Hide Links...";
12. }
13. else {
14. el.style.display="none"; //hide element
15. link.innerHTML = "More...";
16. }
17. return false;
18. }
19. </script>
20. </head>
21. <body>
22. <div style="padding-top:400px">
23.
01-Intro 24.
01-Intro 25.
01-Intro 26. </div>
27. <p><a id="moreLink" href="#" onClick="return showAndHide('Title')">More...[/url]</p>
28. <div id='Title' style="display:none">
29.
01-Intro 30.
01-Intro 31.
01-Intro 32. </div>
33. </body>
34. </html>
Thanks