]> source.dussan.org Git - jquery-ui.git/commitdiff
Accordion: Prevent the navigation filter from finding multiple elements. Fixes #4889...
authorScott González <scott.gonzalez@gmail.com>
Tue, 13 Jul 2010 12:51:37 +0000 (08:51 -0400)
committerScott González <scott.gonzalez@gmail.com>
Tue, 13 Jul 2010 12:51:37 +0000 (08:51 -0400)
ui/jquery.ui.accordion.js

index 6560946818e40d4713a4e029795faf7bd3729ad0..07fad31304ee24989754bd96fde09866bf87a857 100644 (file)
@@ -53,7 +53,7 @@ $.widget("ui.accordion", {
                                .addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");
 
                if ( o.navigation ) {
-                       var current = this.element.find("a").filter(o.navigationFilter);
+                       var current = this.element.find("a").filter(o.navigationFilter).eq(0);
                        if ( current.length ) {
                                var header = current.closest(".ui-accordion-header");
                                if ( header.length ) {