@@ -182,33 +182,33 @@ if(jQuery) (function($) {
182
182
var getOptions = function ( select , type ) {
183
183
var options ;
184
184
185
- // Private function to handle recursion in the getOptions function.
186
- var _getOptions = function ( select , options ) {
187
- // Loop through the set in order of element children.
188
- select . children ( 'OPTION, OPTGROUP' ) . each ( function ( ) {
189
- // If the element is an option, add it to the list.
190
- if ( $ ( this ) . is ( 'OPTION' ) ) {
191
- // Check for a value in the option found.
192
- if ( $ ( this ) . length > 0 ) {
193
- // Create an option form the found element.
194
- generateOptions ( $ ( this ) , options ) ;
195
- }
196
- else {
197
- // No option information found, so add an empty.
198
- options . append ( '<li>\u00A0</li>' ) ;
185
+ // Private function to handle recursion in the getOptions function.
186
+ var _getOptions = function ( select , options ) {
187
+ // Loop through the set in order of element children.
188
+ select . children ( 'OPTION, OPTGROUP' ) . each ( function ( ) {
189
+ // If the element is an option, add it to the list.
190
+ if ( $ ( this ) . is ( 'OPTION' ) ) {
191
+ // Check for a value in the option found.
192
+ if ( $ ( this ) . length > 0 ) {
193
+ // Create an option form the found element.
194
+ generateOptions ( $ ( this ) , options ) ;
195
+ }
196
+ else {
197
+ // No option information found, so add an empty.
198
+ options . append ( '<li>\u00A0</li>' ) ;
199
+ }
200
+ }
201
+ else {
202
+ // If the element is an option group, add the group and call this function on it.
203
+ var optgroup = $ ( '<li class="selectBox-optgroup" />' ) ;
204
+ optgroup . text ( $ ( this ) . attr ( 'label' ) ) ;
205
+ options . append ( optgroup ) ;
206
+ options = _getOptions ( $ ( this ) , options ) ;
207
+ }
208
+ } ) ;
209
+ // Return the built string.
210
+ return options ;
199
211
}
200
- }
201
- else {
202
- // If the element is an option group, add the group and call this function on it.
203
- var optgroup = $ ( '<li class="selectBox-optgroup" />' ) ;
204
- optgroup . text ( $ ( this ) . attr ( 'label' ) ) ;
205
- options . append ( optgroup ) ;
206
- options = _getOptions ( $ ( this ) , options ) ;
207
- }
208
- } ) ;
209
- // Return the built string.
210
- return options ;
211
- }
212
212
213
213
switch ( type ) {
214
214
0 commit comments