Skip to content

Commit 6bce29c

Browse files
committed
2 parents deadf3d + a6e5b49 commit 6bce29c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

jquery.minicolors.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@
146146
var size;
147147
var swatches;
148148
var swatch;
149+
var swatchString;
149150
var panel;
150151
var i;
151152

@@ -223,10 +224,11 @@
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),
@@ -283,7 +285,7 @@
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
}
@@ -302,7 +304,7 @@
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
}

0 commit comments

Comments
 (0)