Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Image change on featured image hover WordPress

  • SOLVED

Dead simple. just want to be able to add a image change on hover to all featured images...

Maybe an extra field in the backend? with link to the hover url?

Answers (2)

2012-11-28

Kiet Luong answers:

Hi,
Let me do it for you.
skype: kioluong
Thanks

2012-11-27

Arnav Joy answers:

you have to write some thing like

<script>
jQuery(function($) {
$('.image img').hover(function() {
var src = $(this).attr('src');
var data = $(this).attr('data');
if(!data) return;
// perform the switch
$(this).attr('src', data);
$(this).attr('data', src);
},
function() {
var src = $(this).attr('src');
var data = $(this).attr('data');
if(!data) return;
// perform the switch
$(this).attr('src', data);
$(this).attr('data', src);
});
});
</script>
<a href=""><img src="thumbnail_img_src" data="hover_img_src" /></a>


where hover_img_src may be used as custom field to hold the new hover image.

just change all the things as per your site

also have a look in this article , it will be help full.

http://www.web-design-talk.co.uk/200/jquery-hover-effect-image-gallery-for-ecommerce/z