You can use jQuery:
HTML markup:
<html> <body> <p>Sample text</p> <img class="thumbImage" style="display:none" src="sample.png" /> </body> </html>
Javascript snippet:
$(document).ready(function(){ $('p').mouseover(function(){
In the snippet, I used fadeIn
, fadeOut
, which adds a nice fade effect.
JQuery doc: here
Or you can use the jQuery plugin that does this, there are many examples on the net.
source share