Lightweight JavaScript Accordion Menu (Only 1KB)
26
May
This is a lightweight (only 1kb), accordion type JavaScript horizontal menu that does not require any JavaScript frameworks.
It is very easy to setup as the script automatically adjusts to the number of elements in the accordion and the dimensions of the accordion.
How it works?
- Create an unordered list like this:
<ul id="sm" class="sm">
<li><img src="images/1.gif" alt="" /></li>
<li><img src="images/2.gif" alt="" /></li>
<li><img src="images/3.gif" alt="" /></li>
<li><img src="images/4.gif" alt="" /></li>
</ul>
- Call the function below onload
slideMenu.build('sm',200,10,10,1)">
- That’s all.
Parameters:
- First: id of the unordered list
- Second: width of the accordion
- Third: timeout variable to control how quickly the sliding function is called
- Fourth: speed of the accordion with 1 being the fastest
- Fifth: is the integer that corresponds to the section you would like to be expanded when the accordion is loaded (optional)
Requirements: No Requirements
Compatibility: All Major Browsers
Website: http://www.leigeber.com/2008/05/horizontal-javascrip...
Compatibility: All Major Browsers
Website: http://www.leigeber.com/2008/05/horizontal-javascrip...
- Tags:
Accordion Javascript List
- Filed under: Goodies, Menu & Navigation, Other License


















One Response for "Lightweight JavaScript Accordion Menu (Only 1KB)"
[...] <body onload=“slideMenu.build(’sm’,200,10,10,1)”> Bu şekilde kullanımla başlayan kodun ayrıca ufak bir javascript dosyası var. Buradan ayrıntılı bilgiyi alabilirsiniz. Kaynak: webresourcesdepot [...]