1
0
mirror of https://github.com/ruanyf/es6tutorial.git synced 2025-05-24 18:32:22 +00:00

add page flip

This commit is contained in:
ruanyf 2014-04-29 20:11:10 +08:00
parent dfe796d8fa
commit 9048db19b8

View File

@ -43,7 +43,7 @@ function initialize() {
var newScroll = $(document).scrollTop(), var newScroll = $(document).scrollTop(),
diff = newScroll-lastScroll; diff = newScroll-lastScroll;
treshold = (treshold+diff>headerHeight) ? headerHeight : treshold+diff; treshold = (treshold+diff>headerHeight) ? headerHeight : treshold+diff;
treshold = (treshold < 0) ? 0 : treshold; treshold = (treshold < 0) ? 10 : treshold;
$('#flip').css('bottom', (-treshold)+'px'); $('#flip').css('bottom', (-treshold)+'px');