Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
Collapsible: fix the bug about collapsedIcon
Browse files Browse the repository at this point in the history
Closes gh-6708
Fixes gh-7089
  • Loading branch information
allsteady authored and Gabriel Schulhof committed Feb 7, 2014
1 parent 4696651 commit 2312506
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions js/widgets/collapsible.js
Expand Up @@ -201,8 +201,11 @@ $.widget( "mobile.collapsible", {
if ( currentOpts.collapsedIcon ) {
anchor.removeClass( "ui-icon-" + currentOpts.collapsedIcon );
}
if ( opts.collapsedIcon ) {
anchor.addClass( "ui-icon-" + opts.collapsedIcon );
if ( /false/i.test( opts.collapsedIcon ) ) {
anchor.removeClass( "ui-btn-icon-" + ( currentOpts.iconPos === "right" ? "right" : "left" ) );
} else {
anchor.addClass( "ui-icon-" + opts.collapsedIcon )
.toggleClass( "ui-btn-icon-" + ( currentOpts.iconPos === "right" ? "right" : "left" ), true );
}
}
} else {
Expand Down

0 comments on commit 2312506

Please sign in to comment.