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>
- Call the function below onload
- That’s all.
- 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)
Compatibility: All Major Browsers