【发布时间】:2012-03-09 07:42:38
【问题描述】:
我目前正在使用 fancyBox 2。就像一个魅力,很棒的工具。只是一件小事:我想禁用加载图标,但我不知道应该把它放在哪个回调中。这是我正在使用的代码:
$("a.iframe").each(function () {
$(this).fancybox({
'openEffect': 'elastic',
'closeEffect': 'elastic',
'margin': 0,
'padding': 0,
'topRatio': 0.1,
'scrolling': 'no',
'modal': true,
'type': 'iframe',
'afterLoad': function () {
$.fancybox.hideLoading();
},
'afterShow': function () {
var heightPane = $('.fancybox-iframe').contents().find('#content').height();
$('.fancybox-iframe').contents().find('#pane2').css({
'height': heightPane + 'px',
'overflow': 'auto'
})
}
})
});
把 $.fancybox.hideLoading();在 afterLoad 回调中不做任何事情。加载图标仍然出现。我什至把方法放在函数之前,图标仍然出现。
有人知道该怎么做吗?
【问题讨论】:
标签: jquery icons fancybox hide loading