mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
UI Tabs: fixed mouseover event option conflicting with default state handling (fixes #3799), cleaned up white space
This commit is contained in:
parent
f3ae85024a
commit
8ff7897aa2
@ -187,15 +187,18 @@ $.widget("ui.tabs", {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// states
|
// states
|
||||||
|
if (o.event != 'mouseover') {
|
||||||
var handleState = function(state, el) {
|
var handleState = function(state, el) {
|
||||||
if (el.is(':not(.ui-state-disabled)')) el.toggleClass('ui-state-' + state);
|
if (el.is(':not(.ui-state-disabled)')) el.toggleClass('ui-state-' + state);
|
||||||
};
|
};
|
||||||
this.$lis.bind('mouseover.tabs mouseout.tabs', function() {
|
this.$lis.bind('mouseover.tabs mouseout.tabs', function() {
|
||||||
handleState('hover', $(this));
|
handleState('hover', $(this));
|
||||||
});
|
});
|
||||||
|
// TODO focus/blur don't seem to work with namespace
|
||||||
this.$tabs.bind('focus.tabs blur.tabs', function() {
|
this.$tabs.bind('focus.tabs blur.tabs', function() {
|
||||||
handleState('focus', $(this).parents('li:first'));
|
handleState('focus', $(this).parents('li:first'));
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// clean up to avoid memory leaks in certain versions of IE 6
|
// clean up to avoid memory leaks in certain versions of IE 6
|
||||||
$(window).bind('unload', function() {
|
$(window).bind('unload', function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user