SimpleModal 站点中启用动画的示例具有以下动画:
1. Fade in the overlay
2. Slide down the modal div
这是代码:
$("#the-div").modal({
onOpen: function (dialog) {
dialog.overlay.fadeIn('fast', function () {
dialog.data.hide();
dialog.container.show('fast', function () {
dialog.data.slideDown('fast');
});
});
}});
我想要这个动画:
1. Just display the modal
2. Fade in the overlay
唉,简单地从上面的代码中删除第二个参数是dialog.overlay.fadeIn()
行不通的。我还尝试删除 的参数dialog.container.show()
,也将其更改为dialog.container.open()
. 我尝试了其他代码组合,但无济于事。
如何实现我想要的动画?