mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Accordion: Prevent the navigation filter from finding multiple elements. Fixes #4889 - Navigation parameter can open multiple sections.
This commit is contained in:
parent
f560862666
commit
2bf91e8e28
2
ui/jquery.ui.accordion.js
vendored
2
ui/jquery.ui.accordion.js
vendored
@ -53,7 +53,7 @@ $.widget("ui.accordion", {
|
|||||||
.addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");
|
.addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");
|
||||||
|
|
||||||
if ( o.navigation ) {
|
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 ) {
|
if ( current.length ) {
|
||||||
var header = current.closest(".ui-accordion-header");
|
var header = current.closest(".ui-accordion-header");
|
||||||
if ( header.length ) {
|
if ( header.length ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user