我有一个ruby-on-rails应用程序,它为首次使用的用户显示模式对话框。但是,如果用户关闭对话框,我想将用户重定向到主页。我怎么做?这是我的JQuery片段。感谢。
this.dialog(
{
modal:true,
width:'auto',
height:'auto',
title: 'New to Purchest? Subscribe to deals that interest you!'
close: function(event, ui) { }
}
)
答案 0 :(得分:4)
我认为这就像向close
回调添加代码一样简单:
this.dialog(
{
modal:true,
width:'auto',
height:'auto',
title: 'New to Purchest? Subscribe to deals that interest you!'
close: function(event, ui) {
top.location.href = 'http://www.wheredoyouwanttogotoday.com';
// ^^ obscure microsoft marketing reference
}
});