Why does this part of my menu not disappear?

Head out to http://brucegust.com/portfolio/verizon/test.php

Click on the menu icon and click on "network operations." Now click on "system performance." You'll notice that when you do, the "network operations" menu disappears. That happens with every menu option EXCEPT "budget reports and support."

It's a simple series of functions that does all this and it's pretty redundant which is what makes the fact that the "budget reports and support" button doesn't trigger the "network operations" menu option to disappear.

For example, on line 158 you see:

function performance()
            {
                  $('#regions_sub').hide();
                  $('#planning_sub').hide();
                  $('#budget_sub').hide();
                  $('#network_ops_sub').hide();
                  $('#system_perf_sub_level').hide();
            }

"network_ops_sub" is the id of my ul that needs to fade. This particular example works just fine.

But when you go up to line 143, you'll see the "budget" function and although the code is pretty much identical, the "network_ops_sub" doesn't disappear.

Why? What am I missing?
Bruce GustPHP DeveloperAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Tom BeckCommented:
I think it would be wise to correct the structural problems before troubleshooting the menu problem. You have multiple stray </span> tags. You have markup in the head section, namely a <map> and <area> tags. There is no </body> or </html> tags at the bottom of the page. Plus dozens of other errors.

https://validator.w3.org/check?uri=http%3A%2F%2Fbrucegust.com%2Fportfolio%2Fverizon%2Ftest.php%23&charset=%28detect+automatically%29&doctype=Inline&group=0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Rainer JeschorCommented:
+1(000) for Toms comment.
jQuery / JavaScript and most current browser really need a 100% correct DOM - otherwise you can never expect that DOM manipulations work as designed.
HTH
Rainer
Bruce GustPHP DeveloperAuthor Commented:
Hey, Tom!

It was in the midst of going back and cleaning up the code that I found the problem: The function that was giving me grief was one that I had inadvertently duplicated. Once I eliminated the redundancy (as well as clean things up in general), it started singing on key.

Thanks!
Tom BeckCommented:
Glad to hear it. Thanks for the points.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.