JapSeyz
JapSeyz

Reputation: 35

Have Javascript display some text onMouseOver

i have this line of code

<img src="1.png" id="friends" onMouseOver="document.writeln('We are 86');"</h2>

I want instead of remove everything else on the site, when i hover over it, to display a bit of text under it. How would this be done? Thanks

Upvotes: 0

Views: 2697

Answers (1)

Lars Kotthoff
Lars Kotthoff

Reputation: 109242

You could either add a title attribute that most browsers will display automatically when you hover over the element without the need for any additional Javascript or you could use a library like tipsy.

Upvotes: 2

Related Questions