Method returns index of active slide or -1 if none is selected. Slides are numbered from 0, which means that 1st slide = 0, 2nd slide = 1 etc.
1) Method can be called inside every callback function (as demonstrated in demo 1):
this.getActiveSlideIndex();
2) In case there is only one element matching the selector, method can be called anywhere in your code (as demonstrated in demo 2):
$('selector').data('jAccordion').getActiveSlideIndex();
3) In case there are more elements matching the selector, method can be called anywhere in your code (eq(index) specifies index of accordion instace):
$('selector').eq(index).data('jAccordion').getActiveSlideIndex();
Demo 1 demonstrates how to call the described method inside callback functions onSlideStartOpening(), onSlideOpened() and onSlideStartClosing() (the protocol is the same for all callback functions). Move your cursor over a slide of accordion and look at the report displayed below it.
Note: You can gain direct access to index of active slide in callbacks onSlideOpened(), onSlideStartOpening() and onSlideStartClosing() as you can read in section called "Event properties" in description of these callbacks. There is no need to call the described method in the mentioned callbacks, the demonstration was created just to prove that it's possible.
Demo 2 demonstrates how to call the described method anywhere in your code.
jAccordion by maniacpc, exclusively for CodeCanyon