How to put delay on .append for my animation text in foreach loop

  animation, javascript

Hi I am having animation that will slide text up but it is too fast, I want to slow it down.
I am using .pend to have the the animation working.

here is my code, I just want to slow down the append thing

$splitByWords.each(function () {

var $this = $(this);
var words = $this.text().split(" ");
$this.empty();
var space;
$.each(words, function (i, v) {
  space = v === ' ' ? ' class="space"' : '';

    $this.append("<span" + space + ">" + v + "</span>";


});

});

Thanks,

Source: Ask Javascript Questions

LEAVE A COMMENT