From 845b1711f3e3a913b46527a2dd428606a8ec2bbf Mon Sep 17 00:00:00 2001 From: iotcat Date: Thu, 17 Mar 2022 17:21:07 +0800 Subject: [PATCH] words --- effect.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/effect.js b/effect.js index f839dea..74891f2 100755 --- a/effect.js +++ b/effect.js @@ -174,9 +174,10 @@ $('document').ready(function(){ function msgLoop (i) { - $("p:nth-child("+i+")").fadeOut('slow').delay(950).promise().done(function(){ + $("p:nth-child("+i+")").fadeOut('slow').delay(500).promise().done(function(){ i=i+1; - $("p:nth-child("+i+")").fadeIn('slow').delay(1000+50*($("p:nth-child("+i+")").html().length)); + $("p:nth-child("+i+")").fadeIn('slow').delay(500+100*($("p:nth-child("+i+")").html().length)); + console.log($("p:nth-child("+i+")").html().length) if(i== $("#message_row").children("p").length){ $("p:nth-child("+i+")").delay(6000).fadeOut(3000).promise().done(function () { $('.cake').delay(500).fadeIn(3000);