Javascript 无法更改skrollr菜单滚动速度(持续时间)

Javascript 无法更改skrollr菜单滚动速度(持续时间),javascript,jquery,jquery-mobile,parallax,skrollr,Javascript,Jquery,Jquery Mobile,Parallax,Skrollr,我正在尝试在我的网站中实现skrollr菜单。我想让它做的是当点击按钮时向下滚动到最底部,我已经很好地工作了。问题是无论我做什么,我都不能让它慢于500毫秒。我已经尝试过在所包含的代码中更改持续时间,就像描述中所建议的那样,但这不起作用。无论我做什么,无论是在jQuery中更改持续时间,还是试图强制它通过类,它总是保持在500毫秒。因为我的页面大约18000px长,所以看起来非常可怕。我如何改变它 HTML 我问题的答案是。。当然拼写错误 请注意包含的脚本中的文件名 <script src

我正在尝试在我的网站中实现skrollr菜单。我想让它做的是当点击按钮时向下滚动到最底部,我已经很好地工作了。问题是无论我做什么,我都不能让它慢于500毫秒。我已经尝试过在所包含的代码中更改持续时间,就像描述中所建议的那样,但这不起作用。无论我做什么,无论是在jQuery中更改持续时间,还是试图强制它通过类,它总是保持在500毫秒。因为我的页面大约18000px长,所以看起来非常可怕。我如何改变它

HTML


我问题的答案是。。当然拼写错误

请注意包含的脚本中的文件名

<script src="parallax/js/skrollr.js"></script>
<script src="parallax/js/skroller.menu.min.js"></script>
<script src="parallax/js/_main.js"></script>
中间的脚本名称中有一个意外的e,没有导致任何错误,但也没有加载文件,因此JavaScript函数根本不起作用

skrollr.menu.init(s, {
//skrollr will smoothly animate to the new position using `animateTo`.
animate: true,

//The easing function to use.
easing: 'sqrt',

//Multiply your data-[offset] values so they match those set in skrollr.init
scale: 2,

//How long the animation should take in ms.
duration: function(currentTop, targetTop) {
    //By default, the duration is hardcoded at 500ms.
    return 10000;

    //But you could calculate a value based on the current scroll position (`currentTop`) and the target scroll position (`targetTop`).
    //return Math.abs(currentTop - targetTop) * 10;
},

//If you pass a handleLink function you'll disable `data-menu-top` and `data-menu-offset`.
//You are in control where skrollr will scroll to. You get the clicked link as a parameter and are expected to return a number.
handleLink: function(link) {
    return 400;//Hardcoding 400 doesn't make much sense.
},

//By default skrollr-menu will only react to links whose href attribute contains a hash and nothing more, e.g. `href="#foo"`.
//If you enable `complexLinks`, skrollr-menu also reacts to absolute and relative URLs which have a hash part.
//The following will all work (if the user is on the correct page):
//http://example.com/currentPage/#foo
//http://example.com/currentDir/currentPage.html?foo=bar#foo
///?foo=bar#foo
complexLinks: false,

//This event is triggered right before we jump/animate to a new hash.
change: function(newHash, newTopPosition) {
    //Do stuff
},

//Add hash link (e.g. `#foo`) to URL or not.
updateUrl: false //defaults to `true`.
});
<script src="parallax/js/skrollr.js"></script>
<script src="parallax/js/skroller.menu.min.js"></script>
<script src="parallax/js/_main.js"></script>