File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 146
146
var size ;
147
147
var swatches ;
148
148
var swatch ;
149
+ var swatchString ;
149
150
var panel ;
150
151
var i ;
151
152
223
224
name = '' ;
224
225
swatch = settings . swatches [ i ] ;
225
226
}
227
+ swatchString = swatch ;
226
228
swatch = isRgb ( swatch ) ? parseRgb ( swatch , true ) : hex2rgb ( parseHex ( swatch , true ) ) ;
227
229
$ ( '<li class="minicolors-swatch minicolors-sprite"><span class="minicolors-swatch-color" title="' + name + '"></span></li>' )
228
230
. appendTo ( swatches )
229
- . data ( 'swatch-color' , settings . swatches [ i ] )
231
+ . data ( 'swatch-color' , swatchString )
230
232
. find ( '.minicolors-swatch-color' )
231
233
. css ( {
232
234
backgroundColor : rgb2hex ( swatch ) ,
283
285
if ( settings . show ) settings . show . call ( input . get ( 0 ) ) ;
284
286
} ) ;
285
287
} else {
286
- panel . css ( 'opacity' , 1 ) ;
288
+ panel . show ( ) ;
287
289
if ( settings . show ) settings . show . call ( input . get ( 0 ) ) ;
288
290
}
289
291
}
302
304
minicolors . removeClass ( 'minicolors-focus' ) ;
303
305
} ) ;
304
306
} else {
305
- panel . css ( 'opacity' , 0 ) ;
307
+ panel . hide ( ) ;
306
308
if ( settings . hide ) settings . hide . call ( input . get ( 0 ) ) ;
307
309
minicolors . removeClass ( 'minicolors-focus' ) ;
308
310
}
You can’t perform that action at this time.
0 commit comments