diff options
author | Mario Vavti <mario@mariovavti.com> | 2016-02-08 22:19:38 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2016-02-08 22:19:38 +0100 |
commit | 48963f62f974ce4f2d8e26c344b65e87f704e4d6 (patch) | |
tree | 978c64c3bae1c50cf4992c4dd0566e7a04df481f /view/js/main.js | |
parent | 00ae6bdac6062594d16870dbd9ca0593f534198e (diff) | |
download | volse-hubzilla-48963f62f974ce4f2d8e26c344b65e87f704e4d6.tar.gz volse-hubzilla-48963f62f974ce4f2d8e26c344b65e87f704e4d6.tar.bz2 volse-hubzilla-48963f62f974ce4f2d8e26c344b65e87f704e4d6.zip |
avoid collapsing only above the viewport
Diffstat (limited to 'view/js/main.js')
-rw-r--r-- | view/js/main.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/view/js/main.js b/view/js/main.js index 2b13acc3d..d1bf34699 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -641,7 +641,7 @@ function collapseHeight() { if(orgHeight > divmore_height) { if(! $(this).hasClass('divmore')) { - var trigger = $(window).scrollTop() + ($(window).height() - divmore_height) < $(this).offset().top ? true : false; + var trigger = $(window).scrollTop() < $(this).offset().top ? true : false; if(trigger) { $(this).readmore({ @@ -653,7 +653,7 @@ function collapseHeight() { beforeToggle: function(trigger, element, expanded) { if(expanded) { if((($(element).offset().top + divmore_height) - $(window).scrollTop()) < 65 ) { - $('html, body').animate( { scrollTop: $(window).scrollTop() - (orgHeight - divmore_height) }, {duration: 0 } ); + $(window).scrollTop($(window).scrollTop() - (orgHeight - divmore_height)); } } } |