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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:41:31+00:00 2026-06-16T00:41:31+00:00

I have created a responsive menu that breaks at 480px and below. I have

  • 0

I have created a responsive menu that breaks at 480px and below. I have it to where the following reacts if:

  1. The user clicks on a the “Menu” link.
  2. The menu slideToggles out.
  3. The sub-menus slideToggle out onClick as well.
  4. But you cannot click on any of the pages.

Does this have something to do with the return false?

You may view the example here: http://www.stlredtails.com/construction/

You may need to resize the browser at or belw 480px to see the responsive navigation in action.

Here is the jQuery for the navigation:

jQuery(".navigation ul").hide();
jQuery("#navigation").click(
    function() {
       jQuery(this).siblings("ul").slideToggle(150, "swing");
       return false;
    }
);
jQuery(".navigation > ul > li").click(
    function() {
       jQuery(this).children("ul").slideToggle(150, "swing");
       return false;
    }
);

Thank you all!

  • 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-16T00:41:31+00:00Added an answer on June 16, 2026 at 12:41 am

    The problem comes from the return false. When you’re clicking the links, you’re also clicking the ancestors li and ul. Before the link “activates” the functions bound to the ancestors click event execute. Since they return false the default browser behavior (navigating away) is prevented.

    There are better solutions for this kind of menu behavior, but using what you already you have (and assuming you won’t be changing your html) you can simply add the following to your javascript:

    $('.navigation').on('click', 'a:only-child', function(e) {
        e.stopPropagation();
    });
    

    This searches for all links in the navigation menu that are the only child of their parents (which in this case, happen to be the links you want to continue working as links) and prevents the ancestors click events from executing – the return false shouldn’t happen anymore.

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

Sidebar

Related Questions

I have a bit of JQuery that creates a mobile menu for a responsive
I have a responsive layout and I've created a fading panels animated element with
I'm trying to create a responsive gui, which basically means that I have an
I have created 3 classes as following Ext.mine.TextParent - Inherting from Textfield Ext.mine.child.TextChildA -
I have created some JQuery that will expand a div 'popup' on hover and
I have created an android application that calls (using kSOAP library) a SOAP based
I have created a responsive layout which you can find here: http://pixelcakecreative.com/cimlife/responsive/ The left
I have created a webservice that delivers images. It will always be one-way communication.
I have created a responsive email template which works in all web clients, all
I have two scripts, that I have created. One which is for the desktop

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.