I was creating a simple color testing tool with takes hex values and makes the background of the body of that color but unfortunately it is not working as desired. Link to the pen: https://codepen.io/chiragbhansali/pen/zdRZEv. Please tell where am I going wrong.
You should check inputted text inside of event handler function:
for now in line 4 you set colorCode.
colorCode = d.querySelector(".color-code").value; // -> fff
And it doesnt change , when “input” event occurs.
To fix, copy line 4 into the function of event handler (to line 8)