Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Create a modal dialog box.
- */
- ;
- (function($) {
- $.fn.makeDialog = function () {
- return this.each(function() {
- var $dialog = $(this);
- $dialog.hide().draggable().css('z-index', 3).bind('dlg-launch', null, function() {
- var win = $(window);
- $('body').prepend($('<div> </div>')
- .css({position:'fixed', top:0, left: 0,
- height: win.height(), width: win.width(),
- display:'block', 'z-index': 2,
- 'background-color':'#FFFFFF', opacity: 0.5})
- .attr('id', $dialog.attr('id') + "_mask"));
- $dialog.center().show();
- });
- $dialog.bind('dlg-close', null, function() {
- $('#' + $dialog.attr('id') + "_mask").remove();
- $dialog.hide();
- });
- });
- }
- })(jQuery);
Add Comment
Please, Sign In to add comment