How this Jquery function calls [jumping window]?
Go to the site here: http://en.heroes.gpotato.eu/ and click Register. What is the jquery function or plugin to make this jumping window? 开发者_StackOverflow社区Thanks.
jQuery UI dialog.
This can be done with the jQueryUI framework, downloadable at the jQuery site - http://jqueryui.com
Then, all you need to do, is create a hidden div on your screen, that will be the dialog. Initialize it as a dialog, and then attach the open dialog event to the click() event of the button you want.
Like this :
$(document).ready(function () {
$('#RegisterDialogDiv').dialog({
autoOpen: false,
modal: true,
title: "User Registration",
buttons: {
'Close': function () {
$(this).dialog('close');
},
'Register': function () {
RegisterUser();
}
}
});
$('#RegisterButton').click(function() {
$('#RegisterDialogDiv').dialog('open');
});
});
For the example to work, you need to have a div with an id of 'RegisterDialogDiv', and a button with an id of 'RegisterButton'. Of course, don't forget to include the js script files you need, and you're set.
If by "jumping" window you mean the modal dialog that pops up, this can be achieved by using the jquery ui dialog plugin.
精彩评论