fancybox onClosed回调不起作用 [英] fancybox onClosed callback does not work
本文介绍了fancybox onClosed回调不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用fancyBox v2.0.4 ...
I am using fancyBox v2.0.4 ...
这应该很简单,但是在我的情况下却不起作用...我只是想在fancybox关闭时运行一个回调函数...
Well this should be simple, however it does not work in my case... I simply want to run a callback function when the fancybox is closed...
$('a#stpa_announcement_details_open').fancybox({
'onCleanup': function() { alert('test') },
'hideOnContentClick': true
});
不起作用
$('a#stpa_announcement_details_open').fancybox({
'onClosed': function() { alert('test') },
'hideOnContentClick': true
});
不起作用
推荐答案
您正在使用旧版本中的选项,因此就像-
You are using options from older versions, so it would be like -
$('a#stpa_announcement_details_open').fancybox({
'beforeClose': function() { alert('test') },
'closeClick': true
});
您可以在 http://fancyapps.com/fancybox/#docs
这篇关于fancybox onClosed回调不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文