CodingTrain / CodingTrain/Suggestion-Box
Button text change on mouseWheel [solved]
- Dominant language
- No language data
- Stars
- 570
- Forks
- 85
- PR merge metrics
- No merged PRs in 30d
Description
Hi all,
I'm trying to change a button's text on mouseWheel according to the following array.
`let test = ["A", "B", "C", "D"];`
In my setup function, I'm creating the `button = createButton(test[current]);`
where current is set to 0, and I see my button named A, which is correct.
In mouseWheel, I've managed to increment "current" and I log the correct test[current], as it will display A at first, then B when mouseWheel happens, then C, etc.
How can I now apply this to my button's text?
Also, I would like that the mouseWheel function become available only if mouseOver. Is there any easy way to do that? Combining both mouseOver and mouseWheel.
Thank you so much!
EDIT : I've sort of managed to get around this by creating the button in HTML and changing the value with `document.getElementByID`, but I'd still like to have a solution that does not imply HTML tags.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.