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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T20:04:46+00:00 2026-06-16T20:04:46+00:00

I have been working on a website and run into a problem. In my

  • 0

I have been working on a website and run into a problem. In my FAQ, I have a drop-down menu and a submit button to link to different parts of the FAQ. This works perfectly. The submit button triggers a javascript function which dynamically links to the appropriate anchor on the page. In addition, I want the question chosen by the drop down menu to be highlighted orange. I got the highlight to show up, but only for a split second before it flashes away. I am wondering how to make the highlight stay, instead of flash away? I am not certain why this is happening. In addition, how could I make the highlight fade in using jQuery? I know how to do it through hiding the div then using .fade(), but that results in all of the text disappearing. Thanks so much!

heres a fiddle: http://jsfiddle.net/UjPtv/ but it doesn’t work fully because when you submit it comes up with an error. I think this is because jsfiddle doesn’t allow submit’s, even though this submit is simply running some javascript. If you know a way around please let me know so I can update the link! Thanks!

javascript:

var toggled = 0;
function jump_to (location) {
if(toggled == 0){
    toggled = 1;
    window.location.href = "#" + location;
    $("#wrap"+location).toggleClass("wraps_active");
}
}​

html:

<div id = "main">
        <h2 class = "center">FACTS YOU NEED</h2>
        <h3>The Core Facts You Want To Know</h3>
        <div class = "border">
        <p>
            Jump To: 
              <form onsubmit = "jump_to(jump_list.value)">
              <select name = "jump_list">
              <option value="1">Who can go to the camp?</option>
              <option value="2"><a href = "contact_information.html">When do we check in and out?</a></option>
            </select>
            <input type = "submit" value = "Go"/>
            </form>
        </p>
        </div>
        <div id = "wrap1" class = "wraps">
        <h4><a name = "1"></a>Who can go to the camp? </h4>
        <p>
            The camp is for kids ages 9 to 17 years old who have been diagnosed with celiac disease, a condition that requires life-long adherence to a gluten-free diet.  Given limited space, we are unable to accommodate kids on gluten-free diets for other reasons (such as autism spectrum disorders).  Campers ages 16-17 years may choose to volunteer as junior counselors.  Junior counselors assist the adult volunteers, and for first session junior counselors need to arrive a day early (on Monday) for the staff orientation and training.  If there are more junior counselor applicants than there is available space, priority is given based on age, gender-need, and prior camp experience.
        </p>
        </div>
        <div id = "wrap2" class = "wraps">
        <h4><a name = "2"></a>When do we check in and out?</h4>
        <p>
            Check-in: Please see the "Calendar" on the left hand side of the website for details about each camp.Please do not arrive early.
            </br><br/>
            Check-out:  All campers must be checked out by the stated time so camp can be prepared for the next group, see the "Calendar" for date information.
        </p>
        </div>


    </div>​

css:

.wraps{
border-bottom:1px dashed #C3C3C3;
}
.wraps_active{
border-bottom:1px dashed #C3C3C3;
background:#FFB280;
}​
  • 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-16T20:04:47+00:00Added an answer on June 16, 2026 at 8:04 pm

    Everytime the form is submitted, clean all of the active wrap classes and add it only for the selected one.

    $('form input[type=submit]').click(function(e) {
        e.preventDefault();
    
        var location = $('select[name=jump_list]').val();
        window.location.href = "#" + location;
    
        $('.wraps').removeClass('wraps_active');
        $("#wrap"+location).addClass("wraps_active");
    });
    

    Here is Fiddle.

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

Sidebar

Related Questions

I have been working on a website that has some images that I need
I have been working with an existing website out company has running until I
So I have been working with javascript for a website I am designing, shocker
I am a photographer and I have been working on redesigning my website lately.
I'm working on a website and have been using absolute positioning, since the viewport
I'm working on a small project and I've run into a small problem. The
I am working with the magento api and I have run into a bit
I have been attempting to compile/run a sample WCF application from Juval Lowy's website
I have been working on a Timesheet Management website. I have my home page
I have been working quite a bit with Raphael SVG/VML library, the website states

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.