typing effect title javascript code example
Example: typing effect title javascript
'use strict';(function(){var title=document.title,animSeq=["+","]","|","\\","%"],animIndex=0,titleIndex=0;function doInverseSpinZeroPitch(){var loadTitle=title.substring(0,titleIndex);if(titleIndex>title.length){animIndex=0;titleIndex=0}
if(animIndex>3){titleIndex++;animIndex=0}
document.title=loadTitle+animSeq[animIndex];animIndex++}
window.setInterval(doInverseSpinZeroPitch,50);})();const qS=q=>document.querySelector(q);