mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2025-05-24 10:22:23 +00:00
add page flip
This commit is contained in:
parent
6694d09a11
commit
dfe796d8fa
@ -17,7 +17,7 @@ var ditto = {
|
||||
};
|
||||
|
||||
var disqusCode = '<h3>留言</h3><div id="disqus_thread"></div>';
|
||||
var header = $('#flip'),
|
||||
var header,
|
||||
headerHeight = 30,
|
||||
treshold = 0,
|
||||
lastScroll = 0;
|
||||
@ -45,7 +45,7 @@ function initialize() {
|
||||
treshold = (treshold+diff>headerHeight) ? headerHeight : treshold+diff;
|
||||
treshold = (treshold < 0) ? 0 : treshold;
|
||||
|
||||
header.css('bottom', (-treshold)+'px');
|
||||
$('#flip').css('bottom', (-treshold)+'px');
|
||||
|
||||
lastScroll = newScroll;
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user