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 146146 var size ;
147147 var swatches ;
148148 var swatch ;
149+ var swatchString ;
149150 var panel ;
150151 var i ;
151152
223224 name = '' ;
224225 swatch = settings . swatches [ i ] ;
225226 }
227+ swatchString = swatch ;
226228 swatch = isRgb ( swatch ) ? parseRgb ( swatch , true ) : hex2rgb ( parseHex ( swatch , true ) ) ;
227229 $ ( '<li class="minicolors-swatch minicolors-sprite"><span class="minicolors-swatch-color" title="' + name + '"></span></li>' )
228230 . appendTo ( swatches )
229- . data ( 'swatch-color' , settings . swatches [ i ] )
231+ . data ( 'swatch-color' , swatchString )
230232 . find ( '.minicolors-swatch-color' )
231233 . css ( {
232234 backgroundColor : rgb2hex ( swatch ) ,
283285 if ( settings . show ) settings . show . call ( input . get ( 0 ) ) ;
284286 } ) ;
285287 } else {
286- panel . css ( 'opacity' , 1 ) ;
288+ panel . show ( ) ;
287289 if ( settings . show ) settings . show . call ( input . get ( 0 ) ) ;
288290 }
289291 }
302304 minicolors . removeClass ( 'minicolors-focus' ) ;
303305 } ) ;
304306 } else {
305- panel . css ( 'opacity' , 0 ) ;
307+ panel . hide ( ) ;
306308 if ( settings . hide ) settings . hide . call ( input . get ( 0 ) ) ;
307309 minicolors . removeClass ( 'minicolors-focus' ) ;
308310 }
You can’t perform that action at this time.
0 commit comments