我正在使用SimpleModal
jQuery 中的插件。
当我使用动作事件时,模态对话框出现缓慢。
有什么办法可以提高模态对话框的速度,让它看起来更快?
尝试模式主页上描述的 onOpen 回调:
data.modal({onOpen: function (dialog) {
dialog.overlay.fadeIn('slow', function () {
dialog.container.slideDown('slow', function () {
dialog.data.fadeIn('slow');
});
});
}});
如果这改变了某些东西,请尝试对 fadeIn 函数使用不同的值,而不是使用缓慢的值。
我让用户抱怨速度。对于模态来说,即使是快速淡入也可能有点慢(取决于谁在使用它)。我发现似乎有帮助的一件事就是用低数字调用 show 函数......
$(content).modal({onOpen: function (dialog) {
dialog.overlay.show(10, function () {
dialog.container.show(10, function () {
dialog.data.show(10);
});
});
});