From fbbb29e465d221b61cecef9c41aa74ec3e37df02 Mon Sep 17 00:00:00 2001 From: Kangsik Kim Date: Fri, 8 Nov 2013 17:22:01 +0900 Subject: [PATCH] Collapsible: fix the bug about collapsedIcon Closes gh-6708 Fixes gh-7089 --- js/widgets/collapsible.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/js/widgets/collapsible.js b/js/widgets/collapsible.js index 933edbf8827..08d5588799e 100644 --- a/js/widgets/collapsible.js +++ b/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 {