Collapsible menu and IE 11

Posted on 2014-01-30
Last Modified: 2014-01-30
I was using an outline java script for expanding / collapsing menus. My code is working perfectly in IE 9 and IE 10. In IE 11, the page displays with all menus expanded. Is there a solution for expanding / collapsing menus that will work in all browsers?
Question by:Malloy1446
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 33

Expert Comment

by:Big Monty
ID: 39821387
if you're ok with changing your code and using jQuery, then I would recommend jQuery's accordian plug-in:

It's pretty simple to use and set up, and it works in all major browsers
LVL 58

Expert Comment

ID: 39821427
Where did you get that code - it is ancient!
LVL 58

Expert Comment

ID: 39821526
Code also does not work in Chrome or Firefox, reason it doesn't work in IE11 is because IE11 does not report itself in the same way as earlier versions of IE (MSIE).
Since the code is defunct as far as the 21st century is concerned you would be better off taking Monty's advice or search for more updated code that is not over 10 years old.

Here's a jQuery version

jQuery is a javascript framework used in over 50% of all websites to make cross browser js coding really simple.
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.


Author Comment

ID: 39821721
Cathal: this is exactly what I want to do, but I am not sure how to implement the jQuery. Never used before!
LVL 58

Accepted Solution

Gary earned 500 total points
ID: 39821746
I'll use the fiddle example, I'm sure you can take this then and just add your own menu
This is a full working example, just pop into an html file and load in the browser
<!doctype html>
    border:1px solid red;  
ul ul{
ul li:hover>ul{
    /*display:block;   */
        level 2
        level 2
                level 3

<script src="//"></script>
$(function() {
$('li').click(function(ev) {

Open in new window


Author Closing Comment

ID: 39822166
Works like a charm. Thanks!

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Sending HTML Formatted Email from ASP.NET 2 57
JSON help 8 48
Dropdown animation to normal dropdown 6 28
CSS background-color 5 19
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question