I want to create a menu that will change when mouseover and onclick.
But, my onclick will only turn blank when clicked.
I found out that if i delete the a href, the onclick function will function.
Anyone know how to solve the problem?
<a href="{storeurl}?act=aboutus">
<img src="skins/sunlift/styleImages/navbar_pic/aboutus_n.jpg"
onclick="this.src='skins/sunlift/styleImages/navbar_pic/aboutus_h.jpg'"
onmouseover="this.src='skins/sunlift/styleImages/navbar_pic/aboutus_h.jpg'"
onmouseout="this.src='skins/sunlift/styleImages/navbar_pic/aboutus_n.jpg'"/>
</a>
add return false;
at the end of the callback function:
<a href="{storeurl}?act=aboutus"><img src="skins/sunlift/styleImages/navbar_pic/aboutus_n.jpg"
onclick="this.src='skins/sunlift/styleImages/navbar_pic/aboutus_h.jpg'; return false;"
onmouseover="this.src='skins/sunlift/styleImages/navbar_pic/aboutus_h.jpg'"
onmouseout="this.src='skins/sunlift/styleImages/navbar_pic/aboutus_n.jpg'"
/></a>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With