TypeError:cur未定义

时间:2016-03-12 05:39:06

标签: javascript jquery smooth-scrolling

我正在尝试在网页上实现平滑滚动 这就是我所做的:



$(document).ready(function () {
 $('body').sectionScroll();
  $(function(){
    $(".element").typed({
      strings: ["Creativity", "Uniqueness", "prime Innovation"],
      // Optionally use an HTML element to grab strings from (must wrap each string in a <p>)
      stringsElement: null,
      // typing speed
      typeSpeed: 1,
      // time before typing starts
      startDelay: 0,
      // backspacing speed
      backSpeed: 0,
      // time before backspacing
      backDelay: 500,
      // loop
      loop: true,
      // false = infinite
      loopCount: false,
      // show cursor
      showCursor: true,
      // character for cursor
      cursorChar: "|"
    });
    $('a[href*=#]:not([href=#])').click(function() {
    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') 
	    || location.hostname == this.hostname) {	
	    var target = $(this.hash);
	    target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
      if (target.length) {
         $('html,body').animate({
             scrollTop: target.offset().top
        }, 1000);
            return false;
    	}
    }
  });
  });
});
&#13;
&#13;
&#13;

当我运行pagein浏览器时,我的所有javascript似乎都无法运行。我检查了控制台,这是我得到的错误:

  

TypeError:cur未定义

http://cinsol.stamplayapp.com

pade演示

0 个答案:

没有答案
相关问题