I’m looking to overlay an image in the right hand corner on another image using jquery.
Basically I want the 2nd image to appear over the other image in the right hand corner when the user’s mouse hovers above the image and then vanish when they stop hovering over it. How would I achieve this with Jquery?
@Senad is quite right, you don’t need jQuery for that. However, if you have a more complicated situation and are looking for similar functionality, try:
Wrap them in a containing element. Set the containing element to
position:relativeSet the overlay image to
position:absolute; top:0; left:0;and style the height and width as you like…then use jQuery to handle the hover event…HTML:
CSS:
Code:
See a working example here: http://jsfiddle.net/jsney/10/