Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Collapsible: Add support for same expanded/collapsed non default icon #4803

Merged
merged 2 commits into from

3 participants

@MauriceG

Fixes #4801 Collapsible Content: Info Icon Issue.
Having the same non standard icon for expanded and collapsed state, toggleClass removes the ui-icon-x class for collapsed state.
Tests: Passed.

MauriceG added some commits
@MauriceG MauriceG Collapsible: Add support for same expanded/collapsed non default icon
Fixes #4801 Collapsible Content: Info Icon Issue.
Having the same non standard icon for expanded and collapsed state, toggleClass removes the ui-icon-x class for collapsed state.
Tests: Passed.
a123d54
@MauriceG MauriceG Changing icon comparison to deep-equal 1a0e3a4
@gseguin gseguin merged commit 8550fae into jquery:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 4, 2012
  1. @MauriceG

    Collapsible: Add support for same expanded/collapsed non default icon

    MauriceG authored
    Fixes #4801 Collapsible Content: Info Icon Issue.
    Having the same non standard icon for expanded and collapsed state, toggleClass removes the ui-icon-x class for collapsed state.
    Tests: Passed.
Commits on Aug 7, 2012
  1. @MauriceG
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 2 deletions.
  1. +3 −2 js/widgets/collapsible.js
View
5 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 );
Something went wrong with that request. Please try again.