Uncaught TypeError:无法读取未定义的属性'top'

问题描述 投票:-4回答:1

您好,我的新网站出现了这个错误,我无法使用移动菜单导航,任何帮助将不胜感激...。。。。

var OnePageNavigation = function() {
    var navToggler = $('.site-menu-toggle');
    $("body").on("click", ".main-menu li a[href^='#'], .smoothscroll[href^='#'], .site-mobile-menu .site-nav-wrap li a", function(e) {
      e.preventDefault();

      var hash = this.hash;

      $('html, body').animate({
        'scrollTop': $(hash).offset().top
      }, 600, 'easeInOutCirc', function(){
        window.location.hash = hash;
      });

    });
  };
  OnePageNavigation();

您好,我的新网站出现了这个错误,我无法使用移动菜单导航,非常感谢您的帮助...欢呼.. var OnePageNavigation = function(){var navToggler = $('。site-menu- ...

javascript html dom typeerror mobile-website
1个回答
0
投票

已解决。...

© www.soinside.com 2019 - 2024. All rights reserved.