Simple jQuery airport text effect, need to stop, clear change on fly?
<p>I love to use this simple code here </p>

<blockquote>
  <p><a href="http://www.unwrongest.com/projects/airport/" rel="nofollow">http://www.unwrongest.com/projects/airport/</a></p>
</blockquote>

<p>and it will be use on my web for weather display
<a href="http://www.xaluan.com" rel="nofollow">http://www.xaluan.com</a></p>

<p>the idea is: the temperature will jump from 00 to current temp , it look nice and live..
The issue is, when i change the temp from C to F, or change location of Temp, the temp will need to change then the text effect need to be change on fly too..</p>

<p>but i have try many time even use .stop or .clearQue to restart effect but not success.
it messing up, some case dont run, some case the array of effect is become of combine two array.. i totaly lost, thank for any adivices</p>

<pre><code>this is narrow simple code for statup test:
&lt;span id="tempnow" class="tempnow"&gt;30&lt;/span&gt;
&lt;span onclick="changeC()"&gt;°F&lt;/span&gt;
&lt;span onclick="changeF()"&gt;°C&lt;/span&gt;

&lt;script&gt;
// fist time run will be:

    $(function($){
$('#tempnow').airport(['00','34']);
});

function changeF () {
$('#tempnow').airport([ '00', '91' ]);
 }
function changeC () {
$('#tempnow').airport([ '00', '34' ]);
 }

(function($){ 
     $.fn.extend({  
         airport: function(array) {

            var self = $(this);
            var chars = ['0','9','8','7','6','5','4','3','2','1','-'];
            var longest = 0;
            var items = items2 = array.length;

            function pad(a,b) { return a + new Array(b - a.length + 1).join(' '); }

            $(this).empty();

            while(items--)
                if(array[items].length &gt; longest) longest = array[items].length;

            while(items2--)
                array[items2] = pad(array[items2],longest);

            spans = longest;
            while(spans--)
                $(this).prepend("&lt;span class='c" + spans + "'&gt;&lt;/span&gt;");


            function testChar(a,b,c,d){
                if(c &gt;= array.length)
                    setTimeout(function() { testChar(0,0,0,0); }, 1000);                
                else if(d &gt;= longest)
                    setTimeout(function() { testChar(0,0,c+1,0); }, 1000);
                else {
                    $(self).find('.c'+a).html((chars[b]==" ")?"&amp;nbsp;":chars[b]);
                    setTimeout(function() {
                        if(b &gt; chars.length)
                            testChar(a+1,0,c,d+1);
                        else if(chars[b] != array[c].substring(d,d+1).toLowerCase())
                            testChar(a,b+1,c,d);
                        else
                            testChar(a+1,0,c,d+1);
                    }, 20);
                }
            }

            testChar(0,0,0,0);
        } 
    }); 
})(jQuery);



&lt;/script&gt;
</code></pre>

<p>I put the jsbin here hope some one can help me by code</p>

<pre><code>http://jsbin.com/onaqis/7/edit#source
</code></pre>

<p>thanks..</p>
