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);