We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Getting selectedItemIndex from ejAccordion


Can someone post a code snippet showing how to get the selectedItemIndex from ejAccordion when it changes?  I am trying to use the activate event without success.

Below is the code I am using.  The activate event does not seem to fire.  The console will show the selectedItemIndex when the page loads but not when the active accordion item changes.

Thanks,  Randy



    var accrdnObj;


    $(function () {


            activate: function(){



            enableAnimation: false,

            showRoundedCorner: true


        acrdnObj = $("#courseGroupAccordion").data("ejAccordion");

        var index = acrdnObj.option("selectedItemIndex");

        console.log('selectedItemIndex: ' + index);



    function accordionChange() {


        var index = acrdnObj.option("selectedItemIndex");

        console.log('selectedItemIndex: ' + index);




3 Replies

GS Gobalakrishnan S Syncfusion Team February 10, 2015 01:22 PM UTC

Hi Randy,

We are unable to reproduce the reported issue. We have checked with provided code snippet in our end and we are able to get the selected Item index in the activate event. We have prepared a sample with your code snippet. It can be download from the following location:


Please check with above sample. If still you face any difficulties please get back to us with additional information regarding this issue. We will happy to assist you.


Gobalakrishnan S

RC Randy Craven February 10, 2015 07:31 PM UTC

Thank you Gobalakrishnan, for this reply.  I can see that your example does fire the activate event.

I'll review my code again to see if I can determine the cause and reply back if I need help.

Thanks again,

GS Gobalakrishnan S Syncfusion Team February 12, 2015 05:44 AM UTC

Hi Randy,

Thanks for your update.

Please check in your end .if you face any difficulties then please get back to us, we will assists you gladly.


Gobalakrishnan S

Live Chat Icon For mobile
Up arrow icon