how do i redirect after you click the close button?
$(document).ready(function() {
var $dialog = $('<div></div>')
.html('This dialog will show every time!')
.dialog({
autoOpen: false,
title: 'Basic Dialog'
});
$('#opener').click(function() {
$dialog.开发者_JAVA百科dialog('open');
// prevent the default action, e.g., following a link
return false;
});
});
use
location.href="url";
you can get the bindevent like this
// give your popupid below
$('div#popupid').bind('dialogclose', function(event) {
alert('closed');
location.href="new url";
});
You could define a callback for the close
event in the following way as well:
$(document).ready(function() {
var $dialog = $('<div></div>')
.html('This dialog will show every time!')
.dialog({
autoOpen: false,
title: 'Basic Dialog',
close: function(ui, event) {
$(this).dialog('close');
// redirect over here.
}
});
});
精彩评论