Skip to content
This repository
Browse code

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 authored August 23, 2012

Showing 1 changed file with 3 additions and 2 deletions. Show diff stats Hide diff stats

  1. 5  js/widgets/collapsible.js
5  js/widgets/collapsible.js
@@ -122,13 +122,14 @@ $.widget( "mobile.collapsible", $.mobile.widget, {
122 122
 					event.preventDefault();
123 123
 
124 124
 					collapsibleHeading
125  
-						.toggleClass( "ui-collapsible-heading-collapsed", isCollapse)
  125
+						.toggleClass( "ui-collapsible-heading-collapsed", isCollapse )
126 126
 						.find( ".ui-collapsible-heading-status" )
127 127
 							.text( isCollapse ? o.expandCueText : o.collapseCueText )
128 128
 						.end()
129 129
 						.find( ".ui-icon" )
130 130
 							.toggleClass( "ui-icon-" + expandedIcon, !isCollapse )
131  
-							.toggleClass( "ui-icon-" + collapsedIcon, isCollapse )
  131
+							// logic or cause same icon for expanded/collapsed state would remove the ui-icon-class
  132
+							.toggleClass( "ui-icon-" + collapsedIcon, ( isCollapse || expandedIcon === collapsedIcon ) )
132 133
 						.end()
133 134
 						.find( "a" ).first().removeClass( $.mobile.activeBtnClass );
134 135
 

0 notes on commit 8550fae

Please sign in to comment.
Something went wrong with that request. Please try again.