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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:37:00+00:00 2026-06-10T20:37:00+00:00

All. I have been working on this for some time and can’t seem to

  • 0

All. I have been working on this for some time and can’t seem to come up with a solution. I am working on a new FAQ for our intranet and I am using the jquery scrollTo plugin and the localScroll pluging to accomplish the feel of it. One thing I added was when a user clicks the link for the question, it scrolls the user down to the answer and highlights the fieldset in red to indicate the answer to their question.

My JS looks something like this:

function styleRow(myId) {
  ID = myId.substring(1) var ID = document.getElementById(ID)
  ID.className += " highlight"
}

My HTML looks like this:

<li><a href="#1_1" onclick="styleRow('#1_1')">Question 1<a></li>
<li><a href="#1_2" onclick="styleRow('#1_2')">Question 2</a></li>
<li><a href="#1_3" onclick="styleRow('#1_3')">Question 3</a></li>


<fieldset class="pad18" id="1_1">
<legend class="SubTitleSmall" id="1_1">Answer 1</legend>
     <p class="MT12 ML24">Answer 1 Text</a></p>
</fieldset> 

     <fieldset class="pad18" id="1_2">
<legend class="SubTitleSmall" id="1_2">Answer 2</legend>
<p class="MT12 ML24">Answer 2 Text</p>
</fieldset> 

<fieldset class="pad18" id="1_3">
<legend class="SubTitleSmall" id="1_3">Answer 3</legend>
     <p class="MT12 ML24">Answer 3 Text</p>
</fieldset>

Currently, when a user click a bookmark link the row highlights just fine. However, if they got back to the top and click another link, the styles aren’t clearing on the previously selected question. I know there is no code currently included for that, and that is why I am here.

Any help would be greatly appreciated!

  • 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-10T20:37:01+00:00Added an answer on June 10, 2026 at 8:37 pm

    If you use jQuery,

    function styleRow(myId){
        $(".highlight").removeClass("highlight");
        $(myId).addClass("highlight");
    }
    

    But be aware that the id:

    • Must begin with a letter: A-Z or a-z
    • Can be followed by letters (A-Za-z), digits (0-9), hyphens (“-“), and underscores (“_”)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been working some time on this and I can't find the solution
i've been working on this for some time now but I can't seem to
Ok I have been working on this feature for some time now and it
I have been working on a project for some time now, and I decided
I have been looking for quite some time for an answer to this, and
I've been struggling with this for some time now and I just can't find
I have been working on a first application for some time based on the
I have been working with managing agile teams for quite some time. Now I'm
I have been working on this for hours, and I just can't figure it
I have been working with Struts for some time, but for a project I

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.