Permalink
Browse files

Collapsible: fix the bug about collapsedIcon

Closes gh-6708
Fixes gh-7089
  • Loading branch information...
allsteady authored and gabrielschulhof committed Nov 8, 2013
1 parent 70700a5 commit fbbb29e465d221b61cecef9c41aa74ec3e37df02
Showing with 5 additions and 2 deletions.
  1. +5 −2 js/widgets/collapsible.js
@@ -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 {

0 comments on commit fbbb29e

Please sign in to comment.