Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 474825
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T00:19:37+00:00 2026-05-13T00:19:37+00:00

I have navigation menu using images, I want that if the user click a

  • 0

I have navigation menu using images, I want that if the user click a menu then change the image. Let say my image menu is “about-us-our-mission.jpg” then once the user hit this button then it will change into “about-us-our-mission-roll.jpg”, so if the user hit another button like “about-us-our-pride.jpg” then it should change into “about-us-our-pride-roll.jpg” and back another button into previous images like “about-us-our-mission-roll.jpg” into “about-us-our-mission.jpg”

It is possible?

Thanks in advance

Tirso

here is my html menu

        <ul class="about-nav" id="content-linkwrap">
            <li><a href="javascript:void(0)" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('our-mission','','<? echo base_url() ?>images/about-us-our-mission-roll.jpg',1)" class="hrefmenu" id="mission-href"><img src="<?php echo base_url() ?>images/about-us-our-mission.jpg" id="our-mission"/></a></li>
            <li><a href="javascript:void(0)" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('our-pride','','<? echo base_url() ?>images/about-us-our-pride-roll.jpg',1)" class="hrefmenu" id="pride-href"><img src="<?php echo base_url() ?>images/about-us-our-pride.jpg" id="our-pride"/></a></li>    
            <li><a href="javascript:void(0)" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('our-business','','<? echo base_url() ?>images/about-us-our-philosopy-roll.jpg',1)" class="hrefmenu" id="business-href"><img src="<?php echo base_url() ?>images/about-us-our-philosopy.jpg" id="our-business"/></a></li> 
            <li><a href="javascript:void(0)" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('our-family','','<? echo base_url() ?>images/about-us-our-family-roll.jpg',1)" class="hrefmenu" id="family-href"><img src="<?php echo base_url() ?>images/about-us-our-family.jpg" id="our-family"/></a></li>  
            <li><a href="javascript:void(0)" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('our-profile','','<? echo base_url() ?>images/about-us-our-profile-roll.jpg',1)" class="hrefmenu" id="profile-href"><img src="<?php echo base_url() ?>images/about-us-our-profile.jpg" id="our-profile"/></a></li>                                                               
        </ul>  

here is my javascript which will change the content

$("#content-linkwrap .hrefmenu").click(function(){

    $clicked = $(this);
    // if the button is not already "transformed" AND is not animated

        // each button div MUST have a "xx-button" and the target div must have an id "xx" 
        var idToLoad = $clicked.attr("id").split('-');

        //var img = $(this).parent().find("#our-"+idToLoad[0]).attr("src");     
        //we search trough the content for the visible div and we fade it out
        $("#description").children().filter(":visible").fadeOut("fast", function(){
            //once the fade out is completed, we start to fade in the right div
            $(this).parent().find("#"+idToLoad[0]).fadeIn();
        })
});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T00:19:37+00:00Added an answer on May 13, 2026 at 12:19 am

    Yes, this is possible.

    I would write an event handler with this selector: #content-linkwrap img. Note that I don’t bother with specifying the class .hrefmenu since it looks like all of the anchor tags inside of the #content-linkwrap unordered list are handled identically.

    The event handler would then call functionality that sets all image tags inside of #content-linkwrap to “off” stage using the selector #content-linkwrap img and then modify the src attribute of the selected img tag to have it display the “on” image filename.

    I am essentially “pre-clearing” all of the image tags before setting one of them to “on”. Note that this isn’t the most efficient approach, but it should work fine for small amounts of menu items.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a navigation menu and i am using the hover element to change
Let's say I have a list of categories for navigation on a web app.
I have a navigation menu that has submenus slide down on hover. The menu
Iam trying to generate the menu and For that iam using navigation.xml (Zend Framework)
I have a navigation view with a cell that has something as simple as
We have a custom navigation webpart that uses the PortalSiteMapProvider of MOSS to build
I have a small tabbed navigation setup using CSS. When hovering over the tabs
I have created some rounded navigation tabs using CSS and am having trouble when
I'm using the following code to have a non-JS navigation: <ol id=navigation> <li id=home><a
I have a page using <ul> lists for navigation (Javascript changes the styling to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.