Wednesday, April 20, 2011

How to highlight only the text on hover, not whitespace? (javascript)

I am using jquery to highlight on hover, but it highlights entire div instead of just text. I tried using an "a tag" but do not want a reference link obviously. im sure this is simple, but im wasting too much time on trial and error. tia

From stackoverflow
  • You should use an inline tag like <span>

  • Wrap the text in a span then highlight that.

0 comments:

Post a Comment