Javascript Event.originalEvent.path IE8错误

Javascript Event.originalEvent.path IE8错误,javascript,jquery,twitter-bootstrap,internet-explorer,Javascript,Jquery,Twitter Bootstrap,Internet Explorer,此代码用于在引导中折叠面板。 IE中的e.originalEvent.path不工作 $(document).on('click', '.panel-heading.clickable', function(e) { var $this = $(this); if($(e.originalEvent.path[0]).attr("href") != "#" && $(e.originalEvent.path[0]).is("a") &&am

此代码用于在引导中折叠面板。 IE中的
e.originalEvent.path
不工作

$(document).on('click', '.panel-heading.clickable', function(e) {
        var $this = $(this);
        if($(e.originalEvent.path[0]).attr("href") != "#" && $(e.originalEvent.path[0]).is("a") && !$this.hasClass('panel-collapsed')){
            return false;
        }
        if (!$this.hasClass('panel-collapsed')) {
            $this.parent().children('.panel-body').slideUp();
            $this.addClass('panel-collapsed');
            $this.find('i').removeClass('glyphicon-chevron-up').addClass('glyphicon-chevron-down');
        } else {
            $this.parent().children('.panel-body').slideDown();
            $this.removeClass('panel-collapsed');
            $this.find('i').removeClass('glyphicon-chevron-down').addClass('glyphicon-chevron-up');
        }
    }
);
它在谷歌chrome上工作,但在IE上不起作用。 e.originalEvent.path是否有可用的解决方法?
谢谢

使用的引导版本这是一个非标准功能,可能没有广泛的支持,尤其是在较旧的浏览器中。。。你想在这里做什么我想检查事件是否在a标签上触发,href值不应该是
href!=#要继续折叠面板,我使用bootstrap 3.x。ie8中的OriginaleEvent有任何好的替代方案吗?Hi@SuperUberDuper,您可以使用e.target作为IE 8的替代方案。对于e.OriginaleEvent,您可以探索这些事件属性。,:-)