]> git.mxchange.org Git - friendica.git/commitdiff
Stop scrollToItem() animate twice.
authorozero dien <139508+ozero@users.noreply.github.com>
Thu, 9 Jan 2020 04:59:56 +0000 (13:59 +0900)
committerGitHub <noreply@github.com>
Thu, 9 Jan 2020 04:59:56 +0000 (13:59 +0900)
- Suppress first fade-to-black with `animate(colWhite, 1)`
- Stop animate twice in `colShiny` with `).promise().done(`

view/theme/frio/js/theme.js

index 46cea59ba23c60ccefed8efad885d55ae210139d..2ace5f9573c301563c3141f5ffe438ea0ebc8a63 100644 (file)
@@ -650,9 +650,9 @@ function scrollToItem(elementId) {
        // Scroll to the DIV with the ID (GUID)
        $('html, body').animate({
                scrollTop: itemPos
-       }, 400, function() {
+       }, 400).promise().done( function() {
                // Highlight post/commenent with ID  (GUID)
-               $el.animate(colWhite, 1000).animate(colShiny).animate(colWhite, 600);
+               $el.animate(colWhite, 1).animate(colShiny,200).animate(colWhite, 600);
        });
 }