JavaScript doesnt work, but in jsFiddle it works
<p>I dont understand whats wrong , i am using jquery 1.4.1 and in jsfiddle it works but it still cant work in localhost. i am using chrome.. what can this be possible?
here is the jsfiddle : <a href="http://jsfiddle.net/K8jRf/12/" rel="nofollow">http://jsfiddle.net/K8jRf/12/</a></p>

<p>the JavaScript :</p>

<pre><code>$(document).ready(function() {
    var input = $('#total2'),
        conv = toWords(input.val());
    $('.terbilang').text(conv);
    var th = ['', 'thousand', 'million', 'billion', 'trillion'];
    var dg = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'];
    var tn = ['ten', 'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen', 'sixteen', 'seventeen', 'eighteen', 'nineteen'];
    var tw = ['twenty', 'thirty', 'forty', 'fifty', 'sixty', 'seventy', 'eighty', 'ninety'];

    function toWords(s) {
        s = s.toString();
        s = s.replace(/[\, ]/g, '');
        if (s != parseFloat(s)) return 'You must enter a number';
        var x = s.indexOf('.');
        if (x == -1) x = s.length;
        if (x &gt; 15) return 'too big';
        var n = s.split('');
        var str = '';
        var sk = 0;
        for (var i = 0; i &lt; x; i++) {
            if ((x - i) % 3 == 2) {
                if (n[i] == '1') {
                    str += tn[Number(n[i + 1])] + ' ';
                    i++;
                    sk = 1;
                }
                else if (n[i] != 0) {
                    str += tw[n[i] - 2] + ' ';
                    sk = 1;
                }
            }
            else if (n[i] != 0) {
                str += dg[n[i]] + ' ';
                if ((x - i) % 3 == 0) str += 'hundred ';
                sk = 1;
            }
            if ((x - i) % 3 == 1) {
                if (sk) str += th[(x - i - 1) / 3] + ' ';
                sk = 0;
            }
        }
        if (x != s.length) {
            var y = s.length;
            str += 'point ';
            for (var i = x + 1; i &lt; y; i++) str += dg[n[i]] + ' ';
        }
        return str.replace(/\s+/g, ' ');
        return false;
    }
});​
</code></pre>

<p>the form</p>

<pre><code>&lt;input type="text" id="total2" value="45435435"&gt;
       &lt;/td&gt;
         &lt;/tr&gt;
           &lt;tr&gt;&lt;td&gt;&lt;span class="terbilang"&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
</code></pre>
