# i want to hover image on another image ?

**URL:** https://forum.kirupa.com/t/i-want-to-hover-image-on-another-image/638776
**Category:** web dev
**Created:** [October 6, 2018, 12:49pm UTC](https://forum.kirupa.com/t/i-want-to-hover-image-on-another-image/638776 "2018-10-06T12:49:07Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ponsukeen](https://avatars.discourse-cdn.com/v4/letter/p/f19dbf/32.png) [@ponsukeen](https://forum.kirupa.com/u/ponsukeen)
#### Post date: [October 6, 2018, 12:49pm UTC](https://forum.kirupa.com/t/i-want-to-hover-image-on-another-image/638776/1 "2018-10-06T12:49:07Z")

</div>

i want to hover image on another image ?  
like i have black facebook icon when i want to hover on it  
i want to switch the color to blue how i can do this ? note( facebook icon is circle)

* * *

dich vu [giup viec nha](http://giupviecnha.vn/) uy tín [giúp việc nhà](http://giupviecnha.vn/) giá rẻ

---

<div class="post-metadata">

### Author: ![Wayne](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/wayne/32/16501_2.png) [@Wayne](https://forum.kirupa.com/u/Wayne)
#### Post date: [October 6, 2018, 8:05pm UTC](https://forum.kirupa.com/t/i-want-to-hover-image-on-another-image/638776/2 "2018-10-06T20:05:35Z")

</div>

You simply add an onEvent method and once the method is called it will change the src of the image to another one or it will add a css class that will change the background image on mouse over image.

Please read about react events and how to call methods based on different events, for example onMouseOver:

> **[SyntheticEvent – React](https://reactjs.org/docs/events.html)**
>
> A JavaScript library for building user interfaces

😉

---

<div class="post-metadata">

### Author: ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)
#### Post date: [October 7, 2018, 4:36am UTC](https://forum.kirupa.com/t/i-want-to-hover-image-on-another-image/638776/3 "2018-10-07T04:36:36Z")

</div>

If you are looking for a non-React solution, this will help: [https://www.kirupa.com/html5/preloading\_images.htm](https://www.kirupa.com/html5/preloading_images.htm) 😀
