Stuck on number and letter randomization javascript
<p>So I'm stuck on this script and am having trouble figuring out how to finish it. I need it to change the new_string to be the old string after its finished its animation and then with <code>setInterval</code> after 1 or 2 min run the same animation from the new old string to a new string that I will grab from a JSON. Here is the script:</p>

<pre><code>$(document).ready(function () {
    var old_string = "first word";
    var new_string = "second word";

    while (old_string.length &lt; new_string.length) {
        old_string += " ";
    }
    while (new_string.length &lt; old_string.length) {
        new_string += " ";
    }

    for (i = 0; i &lt; 18; i++) {
        var cell_id = create_cell();
        cycle_characters(old_string.charCodeAt(i), new_string.charCodeAt(i), cell_id);
    }
});

var create_cell = function() {
    var $rack = $("#rack");
    var cell_id = "cell_" + $("#rack .cell").size() + 1;
    $rack.append($("&lt;span class='cell first_run'&gt;").attr("id", cell_id));
    return cell_id;
}

var cycle_characters = function (old, newer, cell_id) {
    // 32 = space; 126 = tilde
    // low-range ASCII only
    var lower_limit = 32;
    var upper_limit = 126;

    var old = parseInt(old);
    var newer = parseInt(newer);

    if (old &gt; upper_limit || old &lt; lower_limit) {
        old = lower_limit;
    }
    if (newer &gt; upper_limit || newer &lt; lower_limit) {
        newer = lower_limit;
    }

    if ("string" != typeof cell_id) {
        cell_id = $(cell_id).attr("id");
    }

    var $cell = $("#" + cell_id);

    $cell.text(String.fromCharCode(old));
    if (newer != old) {
        var call = "cycle_characters(" + (old + 1) + ", " + newer + ", " + cell_id + ")";
        if ($cell.hasClass("first_run")) {
          $cell.removeClass("first_run");
          setTimeout(call, 1000);
        } else {
          setTimeout(call, 20);
        }
    }

}
</code></pre>

<p>Here is also a <a href="http://jsfiddle.net/ktEJy/" rel="nofollow">JsFiddle</a></p>
