jquery - 显示/隐藏菜单在 IE7 中不起作用

标签 jquery html css

我用 jQuery 创建了下拉菜单。除了 IE7,一切都很好。根本不工作。它只会使最后一个链接加粗。我不确定如何调试它。

我创建了 this fiddle.

有没有人有解决办法?

这是不起作用的 JS:

 $(".link-dropdown").on({
        click: function(){
            var $this = $(this);

            if ($this.parent().next().is(":visible")){
                $('.opening-holder').hide();
                $('.link-dropdown').css({
                    'fontFamily': 'Geogrotesque-Regular, Arial, sans-serif'
                });
            } else {
                $('.opening-holder').hide();
                $('.link-dropdown').css({
                    'fontFamily': 'Geogrotesque-Regular, Arial, sans-serif'
                });

                $this.css({
                    'fontFamily': 'Geogrotesque-SemiBold, Arial, sans-serif'
                });

                $this.parent().next().show();
                $this.parent().next().children().show();
            }

            return false;
        }
    });

最佳答案

我为解决方案创建了 fiddle http://jsfiddle.net/EMnw3/27/ 如果可见,我会禁用它并且它有效...

关于jquery - 显示/隐藏菜单在 IE7 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11863284/

相关文章:

javascript - 在javascript中使用for循环将多个元素绑定(bind)到事件处理程序

Jquery UL LI 元素,$.each 到数组

php - 默认选中的复选框出现问题 : Javascript

jquery - 验证插件未验证所有字段

javascript - 如何设置 SVG 路径的样式来拍摄图像?

html - Bootstrap 网格问题

javascript - 如何将图像对象写入div

css - 位置绝对和相对 IE7 问题

html - 将 div 强制设置为 iframe 旁边的 "float"?

javascript - 如何在不破坏整个功能的情况下在 jquery .html() 函数中添加一个 div 对象