Jquery Accordion Help

I am using a simple jquery code for an accordion and the client wants me to have one of the list items opened when the accordion loads. I know I can look up other accordions that already come this way but this one is very simple and I’d like to keep using it if possible. here’s my code, thanks a lot in advance for any help…
[COLOR=“Gray”]
$(function(){
$(‘ul.expand’).each(function(){
$(‘li.trigger’, this).filter(‘:first’).addClass(‘top’).end().filter(‘:not(.open)’).next().hide();
$(‘li.trigger’, this).click(function(){
if($(this).hasClass(‘open’)) {
return false;
} else {
$(this).parent().find(‘li.trigger’).removeClass(‘open’).next().filter(‘:visible’).slideUp();
$(this).addClass(‘open’).next().slideDown();

		}
	});
});

});[/COLOR]

My god man, can I buy you a beer? Thank you so much! Really appreciate this. You saved my day!!!

The code you have already does provides this function. Just add the class “open” to the trigger list item that you want to be open.
for example :


<ul class="expand">
    <li class="trigger open">trigger 1</li>
      <div>content 1</div>
    <li class="trigger">trigger 2</li>
      <div>content 2</div>
</ul>

This page loads with the first list item open.