From 723782d80c097ba2798291d43a6c8c0c018c1c85 Mon Sep 17 00:00:00 2001 From: Richard Worth Date: Tue, 23 Dec 2008 08:00:59 +0000 Subject: Tabs: Added tab hover and focus support. For #3651 Update markup to new UI CSS Framework specs --- ui/ui.tabs.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'ui') diff --git a/ui/ui.tabs.js b/ui/ui.tabs.js index e31747da2..49b7eb4b8 100644 --- a/ui/ui.tabs.js +++ b/ui/ui.tabs.js @@ -78,6 +78,24 @@ $.widget("ui.tabs", { var self = this, o = this.options; + this.$lis + .hover( + function() { + $(this).addClass('ui-state-hover'); + }, + function() { + $(this).removeClass('ui-state-hover'); + } + ); + + this.$tabs + .focus(function() { + $(this).parent().addClass('ui-state-focus'); + }) + .blur(function() { + $(this).parent().removeClass('ui-state-focus'); + }) + this.$tabs.each(function(i, a) { // inline tab if (a.hash && a.hash.replace('#', '')) // Safari 2 reports '#' for an empty hash -- cgit v1.2.3