Display text with typing effect

Highlight your precious content with typing effect. Display content with typing effect will catch user attention. Below is a simple jQuery code that will display specific content with typing effect. Content string character display one by one with specific interval.

Steps for create typing text effect:

1. Add class to your content:

<h3 class="typeEffect" style="display: none;">
    Text display with typing effect.
</h3>

2. Add javascript code:

$('document').ready(function(){
    var objTT = $('.typeEffect');
    var text = objTT.text();
    var ind = 0;
    objTT.text('');
    objTT.show();

    var ttInterval = setInterval(function(){
        if(ind < text.length){
            objTT.text(objTT.text() + text[ind]);
            ind = ind + 1;

            if(text[ind] == ' '){
                objTT.text(objTT.text() + text[ind]);
                ind = ind + 1;
            }
         }else
             window.clearInterval(ttInterval);
     }, 230);

     function typeChar(){
        objTT.text(objTT.text() + text[ind]);
        ind = ind + 1;
     };
});