j-ColorPicker
- Součástí je singleton
- Jednoduchá barva Picker
- Podporuje _tmavé téma__
Použití
var opt = {};
// opt.offsetX {Number} : adds X offset (default: 0)
// opt.offsetY {Number} : adds Y offset (default: 0)
// opt.align {String} : align `left` (default), `center` or `right`
// opt.position {String} : position `top` (default) or `bottom`
// opt.opacity {Number} : converts hex color to RGBA with the opacity e.g. 0.3
opt.element = YOUR_ELEMENT;
// or if you want to use a fixed position:
// opt.x {Number} : `x` position
// opt.y {Number} : `y` position
opt.callback = function(color) {
console.log(color); // callback parameter has string with HEX color (like #bada55)
};
SETTER('colorpicker/show', opt);Použijte ji s <ui-component name="colorpicker">Pokud je součástka ještě nezačleněna, jComponent Stáhnout ji na první použití z adresy DEF.fallback a) The Componentator CDN dle výchozího nastavení). autor: Denis Granec. zdroj: The Componentator Výrobce je autorizován, MIT licence.
<ui-component name="colorpicker"></ui-component>
<div class="container">
<div class="row">
<div class="col-xs-4 col-xs-offset-4" style="text-align:center">
<a href="javascript:void(0)" style="color:black;font-size:30px"><i class="ti ti-dropper"></i></a>
</div>
</div>
</div>
<script>
$(document).on('click', 'a', function() {
var opt = {};
opt.align = 'center';
opt.position = 'top';
opt.element = this;
opt.callback = function(color) {
alert(color);
};
SETTER('colorpicker/show', opt);
});
</script>