easyAccordion jQuery插件回调 [英] easyAccordion jquery plugin callbacks

查看:94
本文介绍了easyAccordion jQuery插件回调的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

easyAccordion jQuery插件在打开手风琴项目后是否有任何回调函数来执行某些操作?

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.

推荐答案

这只需修改插件js文件即可.

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);
});

然后在定义手风琴时添加afterSlide参数.

then add afterSlide parameter when you define the accordion.

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

这篇关于easyAccordion jQuery插件回调的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆