easyAccordion jquery plugin callbacks

2019-08-27 02:58发布

问题:

Does easyAccordion jquery plugin have any callback function to do something after the accordion item is opened?

I want to fade in the title of image after it is opened completely.

回答1:

This should work just modify the plugin js file:

jQuery(this).find('dt').not('active').click(function(){     
    jQuery(this).activateSlide();
    //begin add
    if (settings.afterSlide) { 
        settings.afterSlide();
    }
    //end add
    clearTimeout(timerInstance.value);
});

then add afterSlide parameter when you define the accordion.

$('#your-accordion-container').easyAccordion({ 
   afterSlide: function() { blah }
});