I have a real simple jQuery accordion based on http://www.stemkoski.com/stupid-simple-jquery-accordion-menu/
Everything works fine but I would like it to automatically have the first item in the list open when the page loads
I have everything in a jsfiddle at http://jsfiddle.net/HJ8c7/
Can anyone help?
You can do that pretty easy by triggering the click event. Based on your jsfiddle code:
Apart from you original question, you may want to use jquery differently so that you do not have to use "jQuery" all the time. It is common to bind the jquery object to the $ variable:
Do:
It will open the first element.
you can just do it by jquery
js fiddle demo live
jquery trigger mathod is used for trigger the event
Ref: Jquery trigger