UNPKG

cux-test

Version:

[SB Admin](http://startbootstrap.com/template-overviews/sb-admin/) is an open source, admin dashboard template for [Bootstrap](http://getbootstrap.com/) created by [Start Bootstrap](http://startbootstrap.com/).

44 lines (37 loc) 1.61 kB
$(document).ready(function () { $('.demo').each(function () { // // Dear reader, it's actually very easy to initialize MiniColors. For example: // // $(selector).minicolors(); // // The way I've done it below is just for the demo, so don't get confused // by it. Also, data- attributes aren't supported at this time...they're // only used for this demo. // $(this).minicolors({ control: $(this).attr('data-control') || 'hue', defaultValue: $(this).attr('data-defaultValue') || '', format: $(this).attr('data-format') || 'hex', keywords: $(this).attr('data-keywords') || '', inline: $(this).attr('data-inline') === 'true', letterCase: $(this).attr('data-letterCase') || 'lowercase', opacity: $(this).attr('data-opacity'), position: $(this).attr('data-position') || 'bottom left', change: function (value, opacity) { if (!value) return; if (opacity) value += ', ' + opacity; if (typeof console === 'object') { console.log(value); } }, theme: 'bootstrap' }); }); $("#fillColor").bind("change", function () { document.getElementById("fillColor").style.background = selectedColor.value; }); $("#fillColor2").bind("change", function () { document.getElementById("fillColor2").style.background = selectedColor2.value; }); });