Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- setTimeout( function() {
- var ttes = document.querySelectorAll( '.tte_wrapper' );
- Array.prototype.forEach.call( ttes, function( el ) {
- var typeAttr = el.getAttribute( 'data-effect' );
- // Make the element visible and remove original text.
- // Original text is for SEO.
- var mid = el.querySelector( '.tte_mid' );
- mid.innerHTML = '';
- mid.style.opacity = '';
- if ( typeAttr === 'typing' ) {
- window._tteInitEffectType( el );
- } else if ( typeAttr === 'fade' || typeAttr === 'top-to-bottom' || typeAttr === 'bottom-to-top' || typeAttr === 'vertical-flip' ) {
- window._tteInitEffectFade( el );
- } else if ( typeAttr === 'random-letters' ) {
- window._tteInitEffectRandom( el );
- } else if ( typeAttr === 'text-scrambled' ) {
- window._tteInitEffectScrambled( el );
- }
- } );
- }, 1 )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement