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 8894043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T23:23:55+00:00 2026-06-14T23:23:55+00:00

I have a menu. The menu tabs are images. I’d like that the image

  • 0

I have a menu. The menu tabs are images. I’d like that the image is changing after the click is done.

If I click then on another tab the image should transform to the old one. My idea was to work with .addClass() and .removeClass().

Here is the HTML:

<div class="navigation">

        <ul>
            <li id="1">
                <div id="menuImage1" class="menuImage"></div>
                <div class="menuText"><p>1</p></div>
            </li>
            <li id="2">
                <div id="menuImage2" class="menuImage"></div>
                <div class="menuText"><p>2</p></div>
            </li>
            <li id="3">
                <div id="menuImage3" class="menuImage"></div>
                <div class="menuText"><p>3</p></div>
            </li>
            <li id="4">
                <div id="menuImage4" class="menuImage"></div>
                <div class="menuText"><p>4</p></div>
            </li>
            <li id="5">
                <div id="menuImage5" class="menuImage"></div>
                <div class="menuText"><p>5</p></div>
            </li>
            <li id="6">
                <div id="menuImage6" class="menuImage"></div>
                <div class="menuText"><p>6</p></div>
            </li>
        </ul>

    </div>

JQuery(example for the first menu tab):

$(".navigation li").click(function() {
    $(".menuImage1").addClass('menuImageActive1');
    $(".menuImage1").not(this).removeClass('menuImageActive1');
});

Please can you Help me because my JavaScript isn’t that good.

  • 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-06-14T23:23:56+00:00Added an answer on June 14, 2026 at 11:23 pm

    I think you are looking for jquery mouseup (mouse button release) and mousedown (mouse button press) functions.

    try code like:

    $(".menuImage").mousedown(function() {
        $(this).addClass("class"); // new class on mouse button press
    });
    
    
    $(".menuImage").mouseup(function() {
        $(this).removeClass("class");  //remove class after mouse button release
    });
    

    Is this what you were looking for?

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

Sidebar

Related Questions

So I have a tab menu, SO i.e. And once clicking on the tabs
In my portfolio site I have listed my projects under separate tabs (tab menu).
I have made a dropdown menu that uses tabs to display the specific content
I have this horizontal menu. The menu looks like tabs and are 29px high.
We have Tabs-Menu controls which rely on jQuery library and the dev-manager insist that
So I have a menu in a php file that looks like this (This
I have created menu with tabs and under tabs I use <button> s. Normally
friend's I have a task to place the horizontal scroll or swipe menu tabs
I have a menu section on a website that consists of 2 rows with
I have a menu on my page that is loaded on every page. The

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.