Guest User

Untitled

a guest
Jun 20th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. /**
  2. * Create a modal dialog box.
  3. */
  4. ;
  5. (function($) {
  6. $.fn.makeDialog = function () {
  7. return this.each(function() {
  8. var $dialog = $(this);
  9. $dialog.hide().draggable().css('z-index', 3).bind('dlg-launch', null, function() {
  10. var win = $(window);
  11. $('body').prepend($('<div>&nbsp;</div>')
  12. .css({position:'fixed', top:0, left: 0,
  13. height: win.height(), width: win.width(),
  14. display:'block', 'z-index': 2,
  15. 'background-color':'#FFFFFF', opacity: 0.5})
  16. .attr('id', $dialog.attr('id') + "_mask"));
  17. $dialog.center().show();
  18. });
  19. $dialog.bind('dlg-close', null, function() {
  20. $('#' + $dialog.attr('id') + "_mask").remove();
  21. $dialog.hide();
  22. });
  23. });
  24. }
  25. })(jQuery);
Add Comment
Please, Sign In to add comment