Show the icon on the specific division when switching to the menu


Visit the and check the function of display icon when we hover on menu ul and an icon appears on another div. Kindly send me the fiddle with their "hover to display an icon on another side" function.

Here is an small example:

$('ul li').hover(function() {
  // mouse enter
  var logo = $(this).attr("data-icon"); // get logo from data-icon parameter
  $('.icon img').attr("src", logo); // change logo
}, function() {
  // mouse left
  $('.icon img').attr("src", ""); // remove logo
<script src=""></script>
<div class="icon">
  <img src="">
  <li data-icon=""><a href="#">Item 1</a>
  <li data-icon=""><a href="#">Item 2</a>

This jQuery snippet changes the icon of the img element of the div with the icon class. It get's the logo from the data-icon parameter of the single li elements. If you enter the li element with the mouse (hover), it will change the icon. If you leave the mouse, it will go back.

Please notice: In this example are just placeholder images. You can use fixed images for that to get it working as expected.