From 5e8b257e9f461afa79237aafce88b712708abd4e Mon Sep 17 00:00:00 2001 From: iotcat Date: Fri, 11 Mar 2022 11:17:56 +0800 Subject: [PATCH] word --- effect.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/effect.js b/effect.js index be26f9d..163e128 100755 --- a/effect.js +++ b/effect.js @@ -173,12 +173,13 @@ $('document').ready(function(){ var i; function msgLoop (i) { + $("p:nth-child("+i+")").fadeOut('slow').delay(800).promise().done(function(){ i=i+1; $("p:nth-child("+i+")").fadeIn('slow').delay(1000); - if(i== $("#message_row").children("p").length+2){ - $("p:nth-child(49)").fadeOut('slow').promise().done(function () { - $('.cake').fadeIn('slow'); + if(i== $("#message_row").children("p").length){ + $("p:nth-child("+i+")").delay(4000).fadeOut('slow').promise().done(function () { + $('.cake').delay(400).fadeIn('slow'); }); }