Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Commit 2af7570

Browse files
committed
[collapsible] move default values from collapsedIcon / expandedIcon / iconPos in the "options" section of the widget instead in the main code .
so we have the ability do not display a icon for collapsible .
1 parent 9be2bc9 commit 2af7570

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

js/widgets/collapsible.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ $.widget( "mobile.collapsible", $.mobile.widget, {
1515
collapseCueText: " click to collapse contents",
1616
collapsed: true,
1717
heading: "h1,h2,h3,h4,h5,h6,legend",
18+
collapsedIcon: "plus",
19+
expandedIcon: "minus",
20+
iconPos: "left",
1821
theme: null,
1922
contentTheme: null,
2023
inset: true,
@@ -96,8 +99,8 @@ $.widget( "mobile.collapsible", $.mobile.widget, {
9699
collapsible.addClass( collapsibleClasses );
97100
}
98101

99-
collapsedIcon = $el.jqmData( "collapsed-icon" ) || o.collapsedIcon || "plus";
100-
expandedIcon = $el.jqmData( "expanded-icon" ) || o.expandedIcon || "minus";
102+
collapsedIcon = $el.jqmData( "collapsed-icon" ) || o.collapsedIcon ;
103+
expandedIcon = $el.jqmData( "expanded-icon" ) || o.expandedIcon ;
101104

102105
collapsibleHeading
103106
//drop heading in before content
@@ -111,7 +114,7 @@ $.widget( "mobile.collapsible", $.mobile.widget, {
111114
.buttonMarkup({
112115
shadow: false,
113116
corners: false,
114-
iconpos: $el.jqmData( "iconpos" ) || o.iconpos || "left",
117+
iconpos: $el.jqmData( "iconpos" ) || o.iconpos ,
115118
icon: collapsedIcon,
116119
mini: o.mini,
117120
theme: o.theme

0 commit comments

Comments
 (0)