如何在fancyBox中获取回调
How to get a callback in fancyBox
我想在使用open
函数时在fancyBox中得到一个回调:
$.fancybox.open($("#some_block"));
// or
$.fancybox.open("my text");
如何在 show
块后获得回调?
您可以尝试使用 afterShow
处理程序。
http://jsfiddle.net/nt7x48yr/1/
$.fancybox.open($("#some_block"), {
afterShow: function() {alert('afterShow');}
});
// or
$.fancybox.open("my text", {
afterShow: function() {alert('afterShow');}
});
我想在使用open
函数时在fancyBox中得到一个回调:
$.fancybox.open($("#some_block"));
// or
$.fancybox.open("my text");
如何在 show
块后获得回调?
您可以尝试使用 afterShow
处理程序。
http://jsfiddle.net/nt7x48yr/1/
$.fancybox.open($("#some_block"), {
afterShow: function() {alert('afterShow');}
});
// or
$.fancybox.open("my text", {
afterShow: function() {alert('afterShow');}
});