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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T11:47:49+00:00 2026-06-18T11:47:49+00:00

I’m building a progressively-enhanced , Bootstrap ed web application that features task-centric help on

  • 0

I’m building a progressively-enhanced, Bootstraped web application that features task-centric help on every page. The help area div (id="help_area") loads in a hidden state; generally when the user clicks on the “help” button (a id="nav_help_button"), the main content div condenses from span12 to span9, and the help area is revealed as a span3. This works well.

Because I want to support mobile and tablet, I’m using Bootstrap’s responsive scaffolding. So if you are viewing the page on a narrow viewport, clicking on the help button “reveals” the hidden help area at the bottom of the page‡. I’m trying to use jQuery’s .slideToggle()‘s callback method to execute JavaScript (window.location.hash = "help_area";) that “jumps to” the help area after it is revealed, but having no luck with the jumping (it doesn’t error; it just doesn’t move browser focus to the help area).

How can I reveal a div at the bottom of a page, then jump to it? I’m also using preventDefault so the browser won’t try to jump to the internal link before the target is revealed. Could that be the conflict?

Here’s the relevant ECMA script:

$('#nav_help_button').click(function(event) {
    "use strict"; //let's avoid tom-foolery in this function
    event.preventDefault(); //don't let a tag try to jump us to #help_area before we reveal it
    //adjust spans of main block and help area, set aria-hidden attribute on help block to help screen-readers
    if ( $('#help_area').attr('aria-hidden')==='true' ) {
        $('#content_container.span12').switchClass('span12', 'span9', 300);
        $('#help_area').delay(300).slideToggle(300, function() { window.location.hash = "help_area"; }).attr('aria-hidden', 'false');   
    }
    else {
        $('#help_area').slideToggle(300).attr('aria-hidden', 'true');
        $('#content_container.span9').delay(300).switchClass('span9', 'span12', 300);
    }
});

I have also set up a JSFiddle that illustrates the problem.
To duplicate

  1. open http://fiddle.jshell.net/jhfrench/HdCbu/7/show
  2. then resize that browser window until “PTO, AIT Life, Hours Worked”, etc stacks on top of each other
  3. click on the button in the upper-right corner (the one with three white horizontal bars) to reveal the nav menu
  4. click on the blue “help” button to execute the reveal/jump-to.

‡ As the right-most div, everything to the left of it gets stacked on top, so the newly “revealed” help area is generally below the visible portion of the page.

Related:

  • Javascript to make the page jump to a specific location
  • http://api.jquery.com/event.preventDefault/
  • http://api.jquery.com/slideToggle/
  • 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-18T11:47:50+00:00Added an answer on June 18, 2026 at 11:47 am

    Your JSFiddle does jump when I do exactly as you say (steps 1-4) for my browser, which is Chrome 24. What’s your browser?

    But perhaps this is your problem. If I navigate to http://fiddle.jshell.net/jhfrench/HdCbu/7/show/#help_area (note the appended hash tag) and perform your steps 1-4, my browser does NOT jump. Note that when you first navigate to that URL, there is no visible #help_area. Thus, the URL you’re navigating to specifies a hash tag that’s invisible. Perhaps the browser is a bit confused by this and just leaves the #help_area hash tag in a bad state. It won’t allow scrolling to it from then on, even after it becomes visible. Speculation, but I hope it’s helpful!

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

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I would like my Web page http://www.gmarks.org/math_in_e-mail.txt on my Apache 2.2.14 server to display
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I've got a string that has curly quotes in it. I'd like to replace
I have a small JavaScript validation script that validates inputs based on Regex. I
I have a French site that I want to parse, but am running into
I'm interested in microtypography issues on the web. I want a tool to fix:
I am doing a simple coin flipping experiment for class that involves flipping a
We're building an app, our first using Rails 3, and we're having to build

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.