$(function () { count = 0; anArray = ["2", "a", "4", "a", "6", "an", "8", "a", "10", "a", "12", "a", "14", "an"]; setInterval(function () { count++; $("span.an").fadeOut(0, function () { $(this).text(anArray[count % anArray.length]).fadeIn(0); }); }, 1200); });
$(function () { count = 0; wordsArray = ["interface designer", "2", "UX designer", "4", "product designer", "6", "interface designer", "8", "UX designer", "10", "dog lover", "12", "product designer", "14"]; setInterval(function () { count++; $("span.word").fadeOut(0, function () { $(this).text(wordsArray[count % wordsArray.length]).fadeIn(0); }); }, 1200); });