我有它,所以当您单击右上角的一个氢等元素时,它会在大中心 div 中播放视频并显示有关氢的信息。我让它在本地工作,但我无法让它在网上工作。请任何帮助都会很棒。
这是我的项目的链接 http://travismichael.net/periodic_elements/
这是我网站的脚本
<script type="text/javascript">
$(document).ready(function() {
$('div.video').hide();
$('.icon').click(function(){
    var id=$(this).data('id'),
        thisDiv=$("div.video[data-id='" + id +"']"),
        thisVideo=$("div.video[data-id='" + id +"']").find('video');
    $('video').each(function() {
        this.pause();
        this.currentTime = 0;
    });
       $('div.video').not(thisDiv).fadeOut('fast');
       thisDiv.fadeIn();      
       thisVideo.get(0).play();   
    });
});
</script>
<script type="text/javascript">
$("#periodictable td").hover(function() {
      $(this).stop().animate({opacity: "1"}, 'fast');
    },
    function() {
      $(this).stop().animate({opacity: ".7"}, 'slow');
    });
</script>