trouble changing a font color using an input color picker
Hello,
I'm trying to change the font color of heading text using an input color picker.
the html input is:
<input id="headingTxt" type="text" class="form-control">
the font color to change lives here:
<div class="heading-txt">some text</div>
the code to pick up the font color and change it:
//heading font color
$(document).ready(function(){
function displayVals() {
var singleValue = $( '#headingTxt' ).val();
$('.heading-txt').css('color', + singleValue);
}
$( '#headingTxt' ).change( displayVals );
displayVals();
});
Any help is appreciated. Thank you in advance.