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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:14:50+00:00 2026-06-05T02:14:50+00:00

All other browsers (including IE8+) seem to handle this code with no issue; just

  • 0

All other browsers (including IE8+) seem to handle this code with no issue; just IE7 is failing. It does nothing when the li is clicked (no console errors either). Using latest jquery 1.7.2 library.

Here is the javascript function:

function expandableMenu(){
    $('#nav li').click(function(){
        var $child = $(this).next();
        if($child.is('.subNav')){
            if($child.is(':hidden')){
                $('#nav > ul').slideUp(300);
            }
            $child.slideToggle(300);
        }
    });
}

here’s the html:

  <ul id="nav">
    <li id="accommodations"></li>
    <ul class="subNav">
      <li><a href="#">Kitchen</a></li>
      <li><a href="#">Family Room</a></li>
      <li><a href="#">Sauna</a></li>
    </ul>
    <li id="attractions"></li>
    <ul class="subNav">
      <li><a href="#">Bryce Canyon National Park</a></li>
      <li><a href="#">Zion National Park</a></li>
      <li><a href="#">Cedar Breaks Natl Monument</a></li>
    </ul>
    <li id="reserve"></li>
  </ul>

finally, the CSS:

#nav {
    top: -40px;
    left: 6px;
    position: relative;
    list-style-type: none;
    z-index: -1;
}

#nav li {
    height: 39px;
    vertical-align: bottom;
    position: relative;
}

#nav ul.subNav {
    display: none;
    list-style-type: none;
    width: 273px;
}
  • 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-05T02:14:52+00:00Added an answer on June 5, 2026 at 2:14 am

    First of all, if you’re using nested lists you have to put second ul inside li element:

    <ul id="nav">
        <li id="accommodations">First list
            <ul class="subNav">
              <li><a href="#">Kitchen</a></li>
              <li><a href="#">Family Room</a></li>
              <li><a href="#">Sauna</a></li>
            </ul>
        </li>
        <li id="attractions">Second list
            <ul class="subNav">
              <li><a href="#">Bryce Canyon National Park</a></li>
              <li><a href="#">Zion National Park</a></li>
              <li><a href="#">Cedar Breaks Natl Monument</a></li>
            </ul>
        </li>
        <li id="reserve"></li>
    </ul>
    

    Then use var $child = $(this).find('.subNav'); to get nested list in your click event. Try changing z-index, when I was checking your code on jsfiddle clicking did nothing too – when I changed -1 to 99 it started work. Maybe IE7 does not recognize negative z-index values.

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

Sidebar

Related Questions

This works in all other browsers and I have no idea what the problem
I have the following code which works fine in all browsers other than IE.
I came across this issue when testing a stylesheet across different browsers, including IE6
Fckeditor taking one blank space on load in chrome only.In all other browsers it
RGBA option for input element is not working in Chrome (in all other browsers
I have a problem with IE. All other browsers work fine, but in IE
In other browsers no problem at all. But in chroom when i hover on
Firstly, when I say other browsers I really only mean Firefox because that's all
I currently have a issue with firefox, where all other browser behave in the
Other than just sniffing browsers and telling anyone not using Chrome tough luck on

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.