mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2025-05-24 18:32:22 +00:00
edit js/ditto
This commit is contained in:
parent
ce893ab576
commit
1a6aa1ae42
@ -625,7 +625,7 @@ export function odd(n) {
|
||||
}
|
||||
```
|
||||
|
||||
上面代码中,`even.js`里面的函数`foo`有一个参数`n`,只要不等于0,就会减去1,传入加载的`odd()`。`odd.js`也会做类似操作。
|
||||
上面代码中,`even.js`里面的函数`even`有一个参数`n`,只要不等于0,就会减去1,传入加载的`odd()`。`odd.js`也会做类似操作。
|
||||
|
||||
运行上面这段代码,结果如下。
|
||||
|
||||
|
@ -193,7 +193,6 @@ function show_loading() {
|
||||
}
|
||||
|
||||
function router() {
|
||||
|
||||
var path = location.hash.replace(/#([^#]*)(#.*)?/, './$1');
|
||||
|
||||
if (ditto.save_progress && store.get('menu-progress') !== location.hash) {
|
||||
@ -287,7 +286,6 @@ function router() {
|
||||
var wh = $w.height();
|
||||
var h = $('body').height();
|
||||
var sHeight = h - wh;
|
||||
|
||||
$w.on('scroll', function() {
|
||||
window.requestAnimationFrame(function(){
|
||||
var perc = Math.max(0, Math.min(1, $w.scrollTop() / sHeight));
|
||||
|
Loading…
x
Reference in New Issue
Block a user