Link to home
Start Free TrialLog in
Avatar of jblayney
jblayneyFlag for Canada

asked on

make image rollover from text mouseover


In this page here.

I have 6 callouts below the banner.

One of them is custom wordpress themes and plugins, it has a link below "Learn More"

I put a mouseover on the arrow, that works fine, but I would link the entire link Div to cause it to mouseover as well, So any part of the orange section will cause the Learn More text to change, I want that to include the little arrow icon as well. Can we also make it so it only changes the arrow in the same link as the text

This is my code attempt so far

echo '<a class="myButtonLinkRead" href="'; the_field('page_link');
	 echo '"  onMouseOver="document.arrow_link=\'/wp-content/themes/darkStarMediaTheme/images/small-arrow-link-over.png\'" onMouseOut="document.arrow_link=\'/wp-content/themes/darkStarMediaTheme/images/small-arrow-link.png\'" >'; 
	echo '<img src="/wp-content/themes/darkStarMediaTheme/images/small-arrow-link.png" onMouseOver="this.src=\'/wp-content/themes/darkStarMediaTheme/images/small-arrow-link-over.png\'" onMouseOut="this.src=\'/wp-content/themes/darkStarMediaTheme/images/small-arrow-link.png\'" class="arrow_link">';
	echo '</a> ';
	echo '</a>';

Open in new window

Avatar of leakim971
Flag of Guadeloupe image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jblayney


Thank you for responding

it is being exported from a php function, I will see how to combine them
perfect, thank you
you welcome