A simple javascript code that expands a block of text.
For example, when you click the title or image, the text under it will expand. when you press the title or image again, it will collapse the text.
A function that basically toggles the visibility of an element e.g. click, show, click, hide.
Features
a) List don't have a depth limit and you can use more than one list on the same page.
b) Dynamically adds buttons and expand and collapse all child lists.
c) Set depth level up to which you want to have lists initially expanded.
d) Cross browser support.
e) Accessible to browsers with Javascript or CSS support.
c) Set the ID for div and image tag inside toggleSlide() function.
For Example,
<a style="font-family:verdana;font-size:12px;">
<img src="hexpander/insert.jpg"id="insert3"
align="absmiddle" onClick="toggleSlide('div3',this.id);">Funmin</a>
<div id="div3" style="display:none;overflow:hidden;height:75px;margin:10px;">
d) List any number of div elements to show and hide the text.
License
- This javascript (misspelled as java script)/HTML code is given under GPL License
- i.e. Free use for those who use it as it is.
- Free, if your modification does not remove our copyright information and links.
- Detailed License information can be found here
- You can purchase the script if your requirements does not meet GPL License terms.