Hello all,
I have a simple accordion menu which just needs one tweak to be finished. As of now, all of the accordion lists elements are closed and waiting to be opening upon load. However, I need the first element of the menu to be open by default. Any ideas? Thanks in advance!
Jquery:
- <script type="text/javascript">
- $(document).ready(function(){
- $("#accordian b").click(function(){
- //slide up all the link lists
- $("#accordian ul").slideUp();
- //slide down the link list below the h3 clicked - only if its closed
- if(!$(this).next().is(":visible"))
- {
- $(this).next().slideDown();
- }
- })
- })
-
-
-
-
-
-
- HTML:
-
- <ol id="accordian">
-
- <li>
- <b><i>1</i>Checkout Method</b>
- <ul>
- <li>
- <p>1</p>
- </li>
- </ul>
- </li>
- <li>
- <b><i>2</i>Billing Information</b>
- <ul>
- <li>
- <p>1</p>
- </li>
- </ul>
- </li>
- <li>
- <b><i>3</i>Shipping Information</b>
- <ul>
- <li>
- <p>1</p>
- </li>
- </ul>
- </li>
-
-
- </ol>