Callback function to be executed after a slide is completely open.
Callback function is specified in the configuration section of the plugin.
$('selector').jAccordion({ onSlideOpened : function(e) { //Here goes your code, e.g. alert('Slide ' + e.index + ' is fully open.'); //You can call any public method using this.method() } });
Event is basically an object passed to function as parameter. Object can have multiple attributes which store important callback-related information.
You can work with this object like with any javascript object:
$('selector').jAccordion({ onSlideOpened : function(e) { //You can gain access to event property $slide using e.$slide //You can gain access to event property index using e.index } });
Demo 1 demonstrates how to create your own function displaying index of a fully opened slide below accordion. Opacity of completely open slide is also changed.
Added javascript object (with callback-related attributes) which is passed to the function as parameter (Described in the "Event properties" section.
You can gain access to the open slide using e.$slide while in previous versions you could use this but since this version this (in callback function) means instance of the accordion.
jAccordion by maniacpc, exclusively for CodeCanyon