Skip to main content
Inspiring
September 29, 2016
Question

Text color, rollover and JavaScript?

  • September 29, 2016
  • 1 reply
  • 195 views

I'm using JavaScript to change button text color depending on certain variables, after a separate button click (different button).  The problem is that when the user rolls over the colored text button, it loses the JS color when it returns to normal state.  I was hoping to keep the rollover state, but do I need to delete it, or is there a way to have the normal state retain the JS color after the rollover?  Thanks!

    This topic has been closed for replies.

    1 reply

    Lilybiri
    Legend
    September 29, 2016

    How did you set up the JS?

    On Wednesday, 28 September 2016, bills89323792 <forums_noreply@adobe.com>

    Inspiring
    September 29, 2016

    The final line goes:

    if (this.innerHTML == varA) this.setAttribute( "style", "color:#FFD700" )