How to programmatically change the thumbnail color? #115
Answered
by
mdbassit
Turtleted21
asked this question in
Q&A
-
Hi I try this without success :
default with a empty value : try to change to pink : or
Thanks |
Beta Was this translation helpful? Give feedback.
Answered by
mdbassit
Jul 11, 2023
Replies: 1 comment
-
Hello, First you need to update the color value in the input field: document.getElementById("color-changer").value = "#ff00ff"; Then trigger an input event on the field: document.getElementById("color-changer").dispatchEvent(new Event("input", { bubbles: true })); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
mdbassit
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
First you need to update the color value in the input field:
Then trigger an input event on the field: