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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:34:52+00:00 2026-06-16T01:34:52+00:00

I have created a list which when I select highlights but I only want

  • 0

I have created a list which when I select highlights but I only want one item at time to highlight – also as the item is highlighted I need to enable the button – example below:

 $('#sn-list li a').click(function () {
        $(this).parent('li').toggleClass('highlight');


        if (!currentPage.parent().hasClass('highlight')) {
            $('#tabulation_button').removeProp("disabled");
            alert('hello');
        }
        else {
            $('#tabulation_button').prop("disabled", "disabled");
        }
    });

http://jsfiddle.net/zidski/rEH5L/

  • 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-16T01:34:54+00:00Added an answer on June 16, 2026 at 1:34 am

    Replace

    $(this).parent('li').toggleClass('highlight');
    

    with

    $(this).parent('li').addClass('highlight').siblings().removeClass('highlight');
    

    Secondly I don’t see where this variable is declared currentPage

    This makes no sense in the current context as these are not defined in the code that you have mentioned..

    if (!currentPage.parent().hasClass('highlight')) {
    

    Check Fiddle

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

Sidebar

Related Questions

( Regarding Moss 2007 ) i have created a sharepoint list in which one
i have a unordered list of links, which are dynamically created by Ajax, and
I have created a dropdown list, which is working well in separate page: however,
I have created 9 pages which I ordered from 1-9. What I want is
I have a created a list view for one of my controller's index action.
I have a list which I created in the controller: var PayList = new[]
I have a Manager class and also one frame which isReport .In the frame
I have a list of countries in a database. I have created a select
I have created a list box which is multiple selectable as below: <td rowspan=20>
I have an Excel sheet on which I have created a list consisting of

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.