我有这个调试工具,使用JQuery UI对话框来显示一些信息。只是为了好玩,我想为每个时间框隐藏不同的动画(用按钮关闭等)。JQuery UI对话框随机隐藏动画
$('.devTool .devToolContent').dialog({
autoOpen: false,
modal: true,
hide: "explode",
width:'auto',
dialogClass: 'devToolDialog',
resizable: true,
open: function(event, ui) {
// Make the area outside the box clickable. When cliked the dialog box closes.
$('.ui-widget-overlay').bind('click', function() { $(this).siblings('.ui-dialog').find('.ui-dialog-content').dialog('close'); });
}
});
正如你所看到的,我有爆炸动画现在。一些其他动画是淡入淡出和幻灯片(请参阅Jquery UI documentation - Hide effects上的列表)。
作品。在每个页面加载这些框会得到一个新的动画。在每个“关闭”上随机播放动画会更有趣。 – HNygard 2011-12-14 09:20:05