]> source.dussan.org Git - jquery-ui.git/commitdiff
Accordion: Added focus state to headers.
authorScott González <scott.gonzalez@gmail.com>
Sun, 1 Feb 2009 02:11:06 +0000 (02:11 +0000)
committerScott González <scott.gonzalez@gmail.com>
Sun, 1 Feb 2009 02:11:06 +0000 (02:11 +0000)
ui/ui.accordion.js

index 62f038a1a4e5afe5a7afb7c4d45876d75dc3c56d..c14d5931999f85ab99ecaac59e79f85df7236d53 100644 (file)
@@ -40,7 +40,9 @@ $.widget("ui.accordion", {
 
                this.headers = this.element.find(o.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all")
                        .bind("mouseenter.accordion", function(){ $(this).addClass('ui-state-hover'); })
-                       .bind("mouseleave.accordion", function(){ $(this).removeClass('ui-state-hover'); });
+                       .bind("mouseleave.accordion", function(){ $(this).removeClass('ui-state-hover'); })
+                       .bind("focus.accordion", function(){ $(this).addClass('ui-state-focus'); })
+                       .bind("blur.accordion", function(){ $(this).removeClass('ui-state-focus'); });
 
                this.headers
                        .next()