【问题标题】:show container on hover different container在悬停不同的容器时显示容器
【发布时间】:2013-06-27 09:56:32
【问题描述】:

我试图在将鼠标悬停在页面徽标上时显示隐藏的 div。

网址是:http://www.enbloc-magazin.de/

正如我所说,我想在将鼠标悬停在徽标上时显示一个容器(#snowflakesContainer,显示:无;)。

我使用了几个脚本,例如:

$('#logo').hover(function() {
    $('#snowflakesContainer').toggle();
});

但没有任何效果。

隐藏容器的css是:

#snowflakesContainer {
top: -553px;
position: absolute;
width: 100%;
height: 100%;
display: none;
}

感谢您的帮助!

【问题讨论】:

    标签: html show hidden onhover


    【解决方案1】:

    控制台在您的 facebook jssdk 代码上显示错误。

    Uncaught TypeError: Cannot call method 'getElementsByTagName' of null 
    

    第 8 行:

     button    = container.getElementsByTagName( 'h1' )[0],
    

    尝试将其放在页面下方,以便您有机会加载您的内容。 您的 javascript 应该可以正常工作。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-03-18
      • 1970-01-01
      • 1970-01-01
      • 2021-12-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多