Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #4803 from MauriceG/patch-3

Collapsible: Add support for same expanded/collapsed non default icon
  • Loading branch information...
commit 8550faec0d3ac2775bc0aa2923e69bbcbacb81bc 2 parents 2ab215b + 1a0e3a4
Ghislain Seguin gseguin authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 js/widgets/collapsible.js
5 js/widgets/collapsible.js
View
@@ -122,13 +122,14 @@ $.widget( "mobile.collapsible", $.mobile.widget, {
event.preventDefault();
collapsibleHeading
- .toggleClass( "ui-collapsible-heading-collapsed", isCollapse)
+ .toggleClass( "ui-collapsible-heading-collapsed", isCollapse )
.find( ".ui-collapsible-heading-status" )
.text( isCollapse ? o.expandCueText : o.collapseCueText )
.end()
.find( ".ui-icon" )
.toggleClass( "ui-icon-" + expandedIcon, !isCollapse )
- .toggleClass( "ui-icon-" + collapsedIcon, isCollapse )
+ // logic or cause same icon for expanded/collapsed state would remove the ui-icon-class
+ .toggleClass( "ui-icon-" + collapsedIcon, ( isCollapse || expandedIcon === collapsedIcon ) )
.end()
.find( "a" ).first().removeClass( $.mobile.activeBtnClass );
Please sign in to comment.
Something went wrong with that request. Please try again.