简体   繁体   中英

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"

以下代码可以完成您想要的工作。

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM