【问题标题】:jQuery - Fixed Navigation not working in IEjQuery - 修复了导航在 IE 中不起作用的问题
【发布时间】:2011-07-22 17:02:56
【问题描述】:

我正在学习本教程:http://www.distractedbysquirrels.com/blog/one-page-layout-with-fixed-navigation-and-jquery/

这里是演示:http://demo.distractedbysquirrels.com/one_page_fixed_nav/

它在 Internet Explorer 中不起作用 - 有人知道如何修复它以在 IE 中工作吗?

谢谢 扎克

【问题讨论】:

  • 你的意思是,我认为在 IE6 中不起作用,因为它在 IE7、IE8 和 IE9 中似乎可以正常工作......
  • 默认情况下它在 IE9 中对我不起作用。仅当我启用开发人员工具并刷新页面时它才有效。 document.ready() 问题?
  • 我不适合在 IE8 中工作。
  • 当我启用开发者工具时,它就可以工作了。我怎样才能让它默认工作?

标签: jquery animation navigation


【解决方案1】:

我能看到的唯一问题是缺少可能会惹恼 IE 的 console.log 工具。这可以通过添加以下代码片段来修补:

<script type="text/javascript">
    if(typeof console === "undefined") {
        console = {
            log: function() { }
        };
    }
</script>

【讨论】:

    猜你喜欢
    • 2021-08-05
    • 1970-01-01
    • 2021-05-12
    • 2014-10-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-10-13
    • 2012-02-20
    相关资源
    最近更新 更多