Abubakkar
Abubakkar

Reputation: 15654

How to fire change event for jquery ui accordion?

I know how to us the change event for jquery ui Accordion.

Its change event gets fired in my case when clicking any of the accordion( as that is the defalut behaviour of accordion) and I am able to get all the data in this event like newContent, newHeader, etc.

But I want to manually fire the change event for Accordion and I don't know how to do it.

Also can I fire the change event while the accordion is loaded.

I have an accordion on my page and I want to fire "change event" for each of them as soon as the accordion is loaded as I have my ajax code written in "change event handler"

Upvotes: 1

Views: 1535

Answers (1)

halilb
halilb

Reputation: 4115

The following code should do the work you wanted.

$("#accordion").accordion('activate', itemIndex);

Upvotes: 1

Related Questions