Syntax Help With Hiding All Controls Except The First

Syntax Help With Hiding All Controls Except The First

Hi,

I'm still trying to get to grips with jQuery syntax, so I'd appreciate any help you can offer, or any good resources you can point me to.

I'm working on an accordion-style menu and I'm struggling to get a hide behaviour to work.

Basically I want to hide all of the controls within my specified parent control which have an ID starting with "accordionBody_" except the first one.

(So that the first pane is expanded and the rest are hidden on load.)

I'm using the following:

$('#' + containerId).find("div[id^='accordionBody_']:not(:first)").hide();


But it's not working - it just hides all of the controls.

Where am I going wrong? Thanks in advance for any help you can give.