mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Dialog: Added hover and focus states to all buttons.
This commit is contained in:
parent
77d17fc769
commit
c688dab963
@ -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);
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user