You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the letter animation JS should be changed from getting the innerHTML to getting the innerText and filter out the tags that are not text as if you have let's say an icon in the div till be displayed with all the tags etc
I changed mine to this and works well (needs a bit tweaking it's just for the idea)
function animateSequence() {
var a = $('.sequence');
for (var i = 0; i < a.length; i++) {
var $this = a[i];
var letter = $('.sequence').not($('.sequence').children()).text()
letter = letter.trim();
var str = '';
var delay = 100;
for (l = 0; l < letter.length; l++) {
if (letter[l] != ' ') {
str += '<span style="animation-delay:' + delay + 'ms; -moz-animation-delay:' + delay + 'ms; -webkit-animation-delay:' + delay + 'ms; ">' + letter[l] + '</span>';
delay += 150;
} else
str += letter[l];
}
$this.innerHTML = str;
}
}
function animateRandom() {
var a = $('.random');
for (var i = 0; i < a.length; i++) {
var $this = a[i];
var letter = $('.random').not($('.random').children()).text()
letter = letter.trim();
var delay = 70;
var delayArray = new Array;
var randLetter = new Array;
for (j = 0; j < letter.length; j++) {
while (1) {
var random = getRandomInt(0, (letter.length - 1));
if (delayArray.indexOf(random) == -1)
break;
}
delayArray[j] = random;
}
for (l = 0; l < delayArray.length; l++) {
var str = '';
var index = delayArray[l];
if (letter[index] != ' ') {
str = '<span style="animation-delay:' + delay + 'ms; -moz-animation-delay:' + delay + 'ms; -webkit-animation-delay:' + delay + 'ms; ">' + letter[index] + '</span>';
randLetter[index] = str;
} else
randLetter[index] = letter[index];
delay += 80;
}
randLetter = randLetter.join("");
$this.innerHTML = randLetter;
}
}
The text was updated successfully, but these errors were encountered:
the letter animation JS should be changed from getting the innerHTML to getting the innerText and filter out the tags that are not text as if you have let's say an icon in the div till be displayed with all the tags etc
I changed mine to this and works well (needs a bit tweaking it's just for the idea)
The text was updated successfully, but these errors were encountered: