0

I'm still very new to jQuery. I found this typewrite effect by Yoshi and love it!!! Can someone please tell me, how to make it stop/freeze on the last line?

Here's the script: http://jsbin.com/araget/459/

Here's the question Yoshi answered: https://stackoverflow.com/a/13325547

I do apologize if I've posted this incorrectly, I just couldn't find another way to ask the question and I'm stuck :/

Community
  • 1
  • 1
jaredwins
  • 87
  • 1
  • 7
  • Huh? Taken this excellent given [answer](http://stackoverflow.com/a/13325571/3509874), just remove the function from line 33 to 46. – urbz Jun 26 '14 at 06:33

1 Answers1

1

Try to add clearTimeout if the length is equal to text-index

var clr=null;// variable for clearing timeout
.....
clr = setTimeout(function () { // 
    if(idx==settings.text.length-1){ // check if the length is equal to text.length-1
        clearTimeout(clr); // clear timeout
        return false;  // break the loop     
    }
    ....
    ....

Live Demo

Rohan Kumar
  • 40,431
  • 11
  • 76
  • 106