Reputation: 9
It´s possible do this , i want change image onmouseover :
<img src="icon_rss.png" border="0" alt="" onmouseover="jQuery(this).css('background-image':'url(icon_rss_over.png)');" />
I try change image onmouseover with jquery or i do something bad , i think i do all ok but no get results ok for change the image when go to the cursor over
At the moment i can´t do works fine , thank´s for the help
The best regards !!!
Upvotes: 0
Views: 707
Reputation: 57105
You have Typo
onmouseover="jQuery(this).css('background-image','url(icon_rss_over.png)');"
^ //you need , not :
:
we use .css({})
to assign multiple properties.one or more than one.
onmouseover="jQuery(this).css({'background-image':'url(icon_rss_over.png)'});"
^ ^ ^
Reference
Upvotes: 1
Reputation: 1156
You should check for duplicate threads before you post the same question. I believe this is a good enough explanation how to accomplish what you are asking for;
Change the image source on rollover using jQuery
Upvotes: 0