Having trouble getting the color value of a duplicated input field in Bootstrap Colorpicker. Any suggestions on how to achieve this? Please assist me with this dilemma.
<a href="#" class="btn btn-default" id="cp4">Change background color</a>
<a href="#" class="btn btn-default" id="cp4">Change background color</a>
<script>
$(function () {
$('#cp4').colorpicker().on('changeColor', function (e) {
$('body')[0].style.backgroundColor = e.color.toString('rgba');
});
});
</script>
To view the original code, please visit:
Your help is greatly appreciated!