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
97816c40e3
commit
65206f8905
12
js/ditto.js
12
js/ditto.js
@ -245,10 +245,18 @@ function router() {
|
||||
}
|
||||
|
||||
$('#pageup').on('click',function (){
|
||||
|
||||
for (var i=0;i<menu.length;i++){
|
||||
if (location.hash==='') break;
|
||||
if (menu[i]===location.hash) break;
|
||||
}
|
||||
location.hash = menu[i-1]
|
||||
});
|
||||
$('#pagedown').on('click',function (){
|
||||
|
||||
for (var i=0;i<menu.length;i++){
|
||||
if (location.hash==='') break;
|
||||
if (menu[i]===location.hash) break;
|
||||
}
|
||||
location.hash = menu[i+1];
|
||||
});
|
||||
|
||||
}).fail(function() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user