diff options
author | Scott González <scott.gonzalez@gmail.com> | 2008-12-11 02:48:20 +0000 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2008-12-11 02:48:20 +0000 |
commit | f0051caec41b1830d1d34cc45bbadd83daac93d6 (patch) | |
tree | 3b03eb8dbfc0151c3d0ea2fa22f2f14f85f882c0 | |
parent | 713761c876f650a495f04995d87281b5aeec998f (diff) | |
download | jquery-ui-f0051caec41b1830d1d34cc45bbadd83daac93d6.tar.gz jquery-ui-f0051caec41b1830d1d34cc45bbadd83daac93d6.zip |
Dialog: Fixed variable re-declaration.
-rw-r--r-- | ui/ui.dialog.js | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/ui/ui.dialog.js b/ui/ui.dialog.js index 6c86249d6..3e8633e80 100644 --- a/ui/ui.dialog.js +++ b/ui/ui.dialog.js @@ -70,6 +70,21 @@ $.widget("ui.dialog", { 'ui-corner-all' ) .attr('role', 'button') + .hover( + function() { + $(this).addClass('ui-dialog-titlebar-close-hover'); + }, + function() { + $(this).removeClass('ui-dialog-titlebar-close-hover'); + } + ) + .mousedown(function(ev) { + ev.stopPropagation(); + }) + .click(function() { + self.close(); + return false; + }) .appendTo(uiDialogTitlebar), uiDialogTitlebarCloseText = (this.uiDialogTitlebarCloseText = $('<span/>')) @@ -129,24 +144,7 @@ $.widget("ui.dialog", { position: 'absolute', bottom: 0 }) - .appendTo(uiDialog), - - uiDialogTitlebarClose = $('.ui-dialog-titlebar-close', uiDialogTitlebar) - .hover( - function() { - $(this).addClass('ui-dialog-titlebar-close-hover'); - }, - function() { - $(this).removeClass('ui-dialog-titlebar-close-hover'); - } - ) - .mousedown(function(ev) { - ev.stopPropagation(); - }) - .click(function() { - self.close(); - return false; - }); + .appendTo(uiDialog); uiDialogTitlebar.find("*").add(uiDialogTitlebar).disableSelection(); |