Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixes 4196 - Collapsibles nested in an accordion set are always treat…

…ed as accordions

    How fixed: Checked if the closest parent is a collapsible-set before
    triggering the collapse event.

    How tested: http://jsbin.com/omacox/100 and Docs
  • Loading branch information...
commit e47cc7d6bfd7a35b072c64d13de2c8b0794c38ef 1 parent 6a45815
Jason Scott authored
Showing with 7 additions and 4 deletions.
  1. +7 −4 js/jquery.mobile.collapsibleSet.js
View
11 js/jquery.mobile.collapsibleSet.js
@@ -47,10 +47,13 @@ $.widget( "mobile.collapsibleset", $.mobile.widget, {
}
})
.bind( "expand", function( event ) {
- $( event.target )
- .closest( ".ui-collapsible" )
- .siblings( ".ui-collapsible" )
- .trigger( "collapse" );
+ var closestCollapsible = $( event.target )
+ .closest( ".ui-collapsible" );
+ if( closestCollapsible.parent().is( ":jqmData(role='collapsible-set')" ) ) {
+ closestCollapsible
+ .siblings( ".ui-collapsible" )
+ .trigger( "collapse" );
+ }
});
}
},
Please sign in to comment.
Something went wrong with that request. Please try again.