Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #845740

    Hello, I am trying to get a button on my home page change to another image on mouse over, I have used this code below to do the image change on hover, however how can I add a link to this?

    what-ever-you-like

    #846021

    <img onmouseover="this.src='http://www.aimgrp.com.au/wp-content/uploads/2017/08/Cabinetry-Button-2.jpg';" onmouseout="this.src='http://www.aimgrp.com.au/wp-content/uploads/2017/08/Cabinetry-Button-1.jpg';" src="http://www.aimgrp.com.au/wp-content/uploads/2017/08/Cabinetry-Button-1.jpg" alt="what-ever-you-like" />

    #846210

    Tried this but it doesn’t work either as seen on my website http://www.aimgrp.com.au

    <a href="http://www.aimgrp.com.au/cabinetry-home/"><img src="
    http://www.aimgrp.com.au/wp-content/uploads/2017/08/Cabinetry-Button-1.png" onmouseover="this.src='
    http://www.aimgrp.com.au/wp-content/uploads/2017/08/Cabinetry-Button-2.png'" onmouseout="this.src='
    http://www.aimgrp.com.au/wp-content/uploads/2017/08/Cabinetry-Button-1.png'" /></a>
    #846218

    Also tried this:

    <img onclick="javascript:window.location.href='http://www.aimgrp.com.au/cabinetry-home/'; return false;" onmouseover="this.src='http://www.aimgrp.com.au/wp-content/uploads/2017/08/Cabinetry-Button-2.png';" onmouseout="this.src='http://www.aimgrp.com.au/wp-content/uploads/2017/08/Cabinetry-Button-1.png';" src="http://www.aimgrp.com.au/wp-content/uploads/2017/08/Cabinetry-Button-1.png" alt="what-ever-you-like" />

    Could I please get some help with this??

    #846308

    Hi dlannetts,

    Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look? I am not seeing any buttons on the front page, where did you add the button?

    Please refrain from bumping or replying to your own thread because it gets pushed back to the end of the queue and moderators won’t be able to provide a response immediately. Please be patient while we go through the rest of the queue. Thank you for your understanding.

    Best regards,
    Victoria

    #848085

    Hello,

    I have gotten the code to work properly, as can be seen here: http://www.aimgrp.com.au/

    However these three buttons seem to sometimes change on hover quickly and without issue and sometimes need to be hovered over for some time before they change. The issue isn’t in the code, I am thinking it might be theme related, or perhaps the images are of to higher quality and take to long to load?

    Can anyone offer any ideas on this?

    Here is the code I made up;

    <img onclick="javascript:window.location.href='http://www.aimgrp.com.au/cabinetry-home/'; return false;" onmouseover="this.src='http://www.aimgrp.com.au/wp-content/uploads/2017/08/Cabinetry-Button-2.png';" onmouseout="this.src='http://www.aimgrp.com.au/wp-content/uploads/2017/08/Cabinetry-Button-1.png';" src="http://www.aimgrp.com.au/wp-content/uploads/2017/08/Cabinetry-Button-1.png" alt="Cabinetry" />

    #848675

    Hi dlannetts,

    Yes, those images are too big, you need to load smaller ones, they should be no more than 50kb and they are around 600kb

    View post on imgur.com

    Great progress, by the way :)

    Best regards,
    Victoria

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.