Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS how to replace image on hover on menu

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #166578
    Amit12x
    Participant

    in my website , i have a menu bar with image. i want to replace the image , whenever an user hover on that menu item. this is my menu.

    <ul id="css3menu1" class="topmenu">
        <li class="topfirst"><a class="pressed" href="#" style="width:98px;"><img src="images/home.png" alt=""/>Home</a></li>
        <li class="topmenu"><a href="#" style="width:98px;">&nbsp;</a></li>
        <li class="topmenu"><a href="#" style="width:98px;"><img src="images/home.png" alt=""/>Work</a></li>
        <li class="topmenu"><a href="#" style="width:98px;">&nbsp;</a></li>
        <li class="topmenu"><a href="#" style="width:98px;"><img src="images/home.png" alt=""/>Team</a></li>
        <li class="topmenu"><a href="#" style="width:98px;">&nbsp;</a></li>
        <li class="topmenu"><a href="#" style="width:98px;"><img src="images/home.png" alt=""/>Blog</a></li>
        <li class="topmenu"><a href="#" style="width:98px;">&nbsp;</a></li>
        <li class="topmenu"><a href="#" style="width:98px;"><img src="images/home.png" alt=""/>Reach Us</a></li>    
    </ul>

    now i want to replace of that image of that menu on which user has hoverd. for this purpose i am using jquery. i did this , but i could not proceed.

    $('#css3menu1').find('li').hover(function()
                        {
    
                        }
                    );
    #166579
    Paulie_D
    Member

    Could you make a Codepen with your HTML /CSS & images linked in?

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.