Hi,
I would like to add a hover image treatment to my logo. I would like to add green color image as the hover. This is the image
http://109.199.127.133/~beaut891/ohsnapselfie.com/wp-content/uploads/2017/07/logo_hover.png
What is the code to do that?
Hey navindesigns,
Try adding this code to the end of your functions.php file in Appearance > Editor:
function add_custom_image(){
?>
<script>
jQuery(window).load(function(){
jQuery('.logo img').hover(function(){
jQuery('.logo img').attr('src','http://109.199.127.133/~beaut891/ohsnapselfie.com/wp-content/uploads/2017/07/logo_hover.png');
});
jQuery('.logo img').mouseleave(function(){
jQuery('.logo img').attr('src','http://109.199.127.133/~beaut891/ohsnapselfie.com/wp-content/uploads/2017/06/logo-1.png');
});
});
</script>
<?php
}
add_action('wp_footer', 'add_custom_image');
Best regards,
Mike
YOU ARE AWESOME.
Thank you so much!