Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #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!

    #1086528

    Hey rasmusheil,

    Please refer to the following:

    https://kriesi.at/support/topic/change-image-on-mouseover/

    Best regards,
    Jordan Shannon

    #1086551

    Hi

    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&#8217;);
    });
    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&#8217;);
    });
    });
    </script>
    <?php
    }
    add_action(‘wp_footer’, ‘add_custom_image’);

    #1086864

    Hi rasmusheil,

    Please post us your login credentials (in the “private data” field), so we can take a look at your backend.

    1. Install and activate ” Temporary Login Without Password “.
    2. Go to ” Users > Temporary Logins ” on the left-side menu.
    3. Click ” Create New “.
    4. 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 ).
    5. Click ” Submit “.
    6. 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,
    Nikko

    #1086953

    Thanks, I added private link in the private section.

    #1087001

    Hi 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,
    Nikko

    #1092052

    Thank you Nikko! :)

    #1092128

    Hi,

    I’m glad this was resolved. If you need additional help, please let us know here in the forums.

    Best regards,
    Jordan Shannon

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Picture hover on mouse over’ is closed to new replies.