From bba6860a08b32856b139b5a11c480a040a71424c Mon Sep 17 00:00:00 2001 From: ruanyf Date: Wed, 7 May 2014 23:27:47 +0800 Subject: [PATCH] edit js/ditto --- js/ditto.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/ditto.js b/js/ditto.js index c8b2297..5e2c3cd 100644 --- a/js/ditto.js +++ b/js/ditto.js @@ -251,14 +251,14 @@ function router() { var perc = ditto.save_progress ? store.get('page-progress') || 0 : 0; if(location.hash !== '' || Boolean(perc)){ - if (ditto.save_progress && store.get('menu-progress') !== location.hash){ + if (!Boolean(perc){ $('html, body').animate({ scrollTop: $('#content').offset().top }, 200); console.log('no perc'); } else { $('html, body').animate({ - scrollTop: Boolean(perc)?($('body').height()-$(window).height())*perc:$('#content').offset().top + scrollTop: ($('body').height()-$(window).height())*perc }, 200); console.log('perc'); }