-
AuthorPosts
-
April 3, 2019 at 12:41 pm #1086504
Hi
Can you please provide me some css or other solution to get the image on the front page of my website to change when mouse is on the picture.
Right now it changes when mouse goes over it, but it won’t change back to original picture when mouse comes off the picture.
Thank you very much!
April 3, 2019 at 2:01 pm #1086528Hey rasmusheil,
Please refer to the following:
https://kriesi.at/support/topic/change-image-on-mouseover/
Best regards,
Jordan ShannonApril 3, 2019 at 2:26 pm #1086551Hi
I already use this code below in my functions.php, but it won’t work properly. Image changes when I move on it, but it won’t change back when I take mouse off of it.
function add_custom_image(){
?>
<script>
jQuery(window).load(function(){
jQuery(‘.meie-pilt img’).hover(function(){
jQuery(‘.meie-pilt img’).attr(‘src’,’http://smartex.veebiarendamine.ee/wp-content/uploads/2018/11/meeskond-näidis-joonistus.png’);
});
jQuery(‘.custom-image img’).mouseleave(function(){
jQuery(‘.custom-image img’).attr(‘src’,’http://smartex.veebiarendamine.ee/wp-content/uploads/2018/11/meeskond-näidis-pilt.png’);
});
});
</script>
<?php
}
add_action(‘wp_footer’, ‘add_custom_image’);April 4, 2019 at 9:07 am #1086864Hi rasmusheil,
Please post us your login credentials (in the “private data” field), so we can take a look at your backend.
- Install and activate ” Temporary Login Without Password “.
- Go to ” Users > Temporary Logins ” on the left-side menu.
- Click ” Create New “.
- Add the email address for the account ( you can use (Email address hidden if logged out) ), as well as the ” Role ” making that the highest possible and the expiry about four days
( do be sure that we have enough time to debug ). - Click ” Submit “.
- You’ll now have a temporary account. Please provide us here in the private section the URL, so we can login and help you out.
When your issue is fixed, you can always remove the plugin!
If you prefer to not use the plugin, you can manually create an admin user and post the login credentials in the “private data” field.Best regards,
NikkoApril 4, 2019 at 10:31 am #1086953Thanks, I added private link in the private section.
April 4, 2019 at 11:54 am #1087001Hi rasmusheil,
Thanks, I have modified it to this code:
function add_custom_image(){ ?> <script> jQuery(window).load(function(){ jQuery('.meie-pilt img').hover(function(){ jQuery('.meie-pilt img').attr('src','http://smartex.veebiarendamine.ee/wp-content/uploads/2018/11/meeskond-näidis-joonistus.png'); }); jQuery('.meie-pilt img').mouseleave(function(){ jQuery('.meie-pilt img').attr('src','http://smartex.veebiarendamine.ee/wp-content/uploads/2018/11/meeskond-näidis-pilt.png'); }); }); </script> <?php } add_action('wp_footer', 'add_custom_image');
Let us know if you need further assistance.
Best regards,
NikkoApril 17, 2019 at 3:53 pm #1092052Thank you Nikko! :)
April 17, 2019 at 8:01 pm #1092128Hi,
I’m glad this was resolved. If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon -
AuthorPosts
- The topic ‘Picture hover on mouse over’ is closed to new replies.