I’m a newbie to everything HTML/development-wise so please bear with me while I try to explain what I’m trying to do
I have a page with a div class=“options”, in options I have a html button to roll a dice. This dice button references a JavaScript function a friend helped me work through, outputting to a separate div class=“player1”.
What I would like to do is have the output of the dice roll button fade out after 4 seconds.
I’ve been trying to mash together JQuery to reference the button being activated and (or at least…) then affect the resulting output, but I am honestly really not understanding how to structure the JQuery language and also am not sure if I need to import anything.
I was really hoping for a bit of a quick solution as I intended for this to be a small project, which would be a brief intro to HTML/CSS and JavaScript. If it helps clear anything up, the project is a 2 player or 4 player Magic The Gathering life counter with a dice roll feature (so 2 outputs on one page, on the other it has 4 outputs - to determine starting player)
If there’s anything I need to elaborate on, please let me know!
The bottom demo on http://api.jquery.com/fadeout/ seems to be the closest thing to what I’m after, however there isn’t an existing html element in my code to apply it to - its the output of a JS function