karry
karry

Reputation: 3410

JQuery-how to get a imagelink as pop up on mouse hover on a div tag

I have a tag on a html page on which I am trying to write a jquery function in order to pop open a image link on "hover" which when clicked on, takes me to another web page. I need to set the "navigateURL" property on the link on "hover". I am fairly new to jquery. Can somebody please suggest me a good approach for this?

I highly appreciate any help you can offer. Thanks

Upvotes: 0

Views: 107

Answers (1)

DJ.
DJ.

Reputation: 394

$('#tagdiv').hover(function(e)
       {
         $('#hoverdiv').html('<div><image src="'+$(this).html()+'"/></div>');
});

where 'hoverdiv' is id of any div which is on that page and 'tagdiv' is id of where you want to hover event.

like:

<div id='tagdiv'>image.jpg</div>
<div id='hoverdiv'>&nbsp;</div>

Upvotes: 1

Related Questions