Permalink
Browse files

Merge pull request #4803 from MauriceG/patch-3

Collapsible: Add support for same expanded/collapsed non default icon
  • Loading branch information...
gseguin committed Aug 23, 2012
2 parents 2ab215b + 1a0e3a4 commit 8550faec0d3ac2775bc0aa2923e69bbcbacb81bc
Showing with 3 additions and 2 deletions.
  1. +3 −2 js/widgets/collapsible.js
@@ -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 );

0 comments on commit 8550fae

Please sign in to comment.