I have built a mega menu, where when you click on the nav link it opens, and when you click again it closes (that works correctly). There is also a close link inside that should toggle it closed when clicked, However in IE, it just reopens it everytime it is clicked. It works correctly in Firefox, Chrome and Safari.

It menu has to open and close with clicks because some of the computers use touch screens. Any ideas?

Here is the stripped down code (showing only one nav link):


$('div.megamenu> div').hide();

/* This toggles the nav link open and closed --works correctly */
$(".Benefits-Down").click(function() {

/*This is suppose to also toggle it closed, but it doesn't work in IE*/
$(".Benefits-Close").click(function() {


<div class="megamenu">
<li class="Benefits-Down"><a href="#">Benefits/Pay</a></li>
<div class="Benefits-Dropped">
<div class="Benefits-Close">
<a href="#">Close</a>