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

  • Home
  • SEARCH
  • 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 8810017
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:01:15+00:00 2026-06-14T03:01:15+00:00

I am trying to achieve in JQuery that once a user click on a

  • 0

I am trying to achieve in JQuery that once a user click on a link, such as Feedback.aspx the select attribute from Default.aspx li will be removed and will be added to Feedback.aspx li

<ul id="main_menu" class="main_menu ui-sortable">
            <li class="limenu select"><a href="Default.aspx"><span class="ico gray shadow home"></span><b style="">Home</b></a></li>
            <li class="limenu"><a href="OnlineUsers.aspx"><span class="ico gray shadow messenger"></span><b style="">Who is online?</b></a></li>
            <li class="limenu"><a href="Feedback.aspx"><span class="ico gray shadow hand_thumbsup"></span><b style="">Feedback</b></a></li>
            <li class="limenu"><a href="About.aspx"><span class="ico gray shadow info"></span><b style="">About</b> </a></li>
            <li class="limenu"><a href="UserDetails.aspx"><span class="ico gray shadow  user"></span><b style="">User Details</b> </a></li>
            <li class="limenu"><a href="ChangePassword.aspx"><span class="ico gray shadow password"></span><b style="">Change Password</b></a></li>
            <li class="limenu"><a href="Login.aspx"><span class="ico gray shadow power"></span><b style="">Logout</b> </a></li>
        </ul>

EDIT: My new url is being opened so i need to find Feedback.aspx in the new page add select to it

  • 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-14T03:01:17+00:00Added an answer on June 14, 2026 at 3:01 am

    This should do :

    $('li.limenu a').click(function(){
        $('li.limenu').removeClass('select');
        $(this).parent().addClass('select');
    });
    

    Demonstration

    I added e.preventDefault in this example to not follow the link, I suppose your example uses a default target to a similar effect.

    If you’re changing page, the simplest solution is to check at opening what’s the page :

    $(function(){
        var pathtokens = document.location.pathname.split('/');
        var page = pathtokens[pathtokens.length-1];
        $('li.limenu').removeClass('select'); 
        $('li.limenu a').each(function(){
            if ($(this).attr('href')==page) $(this).parent().addClass('select');
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I fairly new to JQuery and perhaps trying to achieve something that might be
I'm trying to set a default value for several inputs at once, removing that
I'm trying to achieve something similar to jQuery Glow or this fiddle . Specifically
Trying to achieve any moving effect while appending an element from one to another
What i'm trying to achieve is playing a guitar chord from my python application.
I am trying to achieve the following - from a list of questions each
I'm playing around with a little jquery animation and trying to achieve a very
I am using jquery 1.4.2 and trying to achieve the following: 1 - function
So I'm trying to achieve something seemingly very basic in jQuery. I have a
I'm new to javascript/jQuery this really has me stumped. What I'm trying to achieve

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.