diff options
author | Scott González <scott.gonzalez@gmail.com> | 2008-12-21 18:00:42 +0000 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2008-12-21 18:00:42 +0000 |
commit | c688dab9636eb95c2ea1d8d544adeaf6f090925b (patch) | |
tree | 6d1cc90890145925a5f4dd365649c08534c4209e /ui | |
parent | 77d17fc7691decaa6b7dc7db8cd665649696968b (diff) | |
download | jquery-ui-c688dab9636eb95c2ea1d8d544adeaf6f090925b.tar.gz jquery-ui-c688dab9636eb95c2ea1d8d544adeaf6f090925b.zip |
Dialog: Added hover and focus states to all buttons.
Diffstat (limited to 'ui')
-rw-r--r-- | ui/ui.dialog.js | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/ui/ui.dialog.js b/ui/ui.dialog.js index 7a7175fad..de463567b 100644 --- a/ui/ui.dialog.js +++ b/ui/ui.dialog.js @@ -95,12 +95,18 @@ $.widget("ui.dialog", { .attr('role', 'button') .hover( function() { - $(this).addClass('ui-state-hover'); + uiDialogTitlebarClose.addClass('ui-state-hover'); }, function() { - $(this).removeClass('ui-state-hover'); + uiDialogTitlebarClose.removeClass('ui-state-hover'); } ) + .focus(function() { + uiDialogTitlebarClose.addClass('ui-state-focus'); + }) + .blur(function() { + uiDialogTitlebarClose.removeClass('ui-state-focus'); + }) .mousedown(function(ev) { ev.stopPropagation(); }) @@ -255,6 +261,20 @@ $.widget("ui.dialog", { ) .text(name) .click(function() { fn.apply(self.element[0], arguments); }) + .hover( + function() { + $(this).addClass('ui-state-hover'); + }, + function() { + $(this).removeClass('ui-state-hover'); + } + ) + .focus(function() { + $(this).addClass('ui-state-focus'); + }) + .blur(function() { + $(this).removeClass('ui-state-focus'); + }) .appendTo(uiDialogButtonPane); }); } |