Why this code is not working in Google Chrome but working in IE
<p>I have written some code using jQuery to implement the below functionality </p>

<p>1.If I enter any text in textboxes, all the other radio buttons should be unchecked. And autocomplete texts should be displayed.</p>

<p>2.If I check any radio buttons, all the textboxes value should be cleared.
For that I have written the below code.</p>

<pre><code>&lt;script type="text/javascript"&gt;
        function eliminateDuplicates(arr) {
            var i, len = arr.length, out = [], obj = {};
            for (i = 0; i &lt; len; i++) {
                obj[arr[i]] = 0;
            }
            for (i in obj) {
                out.push(i);
            }
            return out;
        }
        var foc;
        $(document).ready(function () {
            var dStyle = {
                position: "absolute",
                height: "0px",
                width: "0px"
            };
            $('fieldset :text').data('text', []);
            $('fieldset :radio').closest('tr').addClass('chk');
            $('.chk td').live('click', function () {
                var i = setTimeout(function () {
                    if ($('fieldset :radio').filter(':checked').size() &gt; 0) {
                        $(':text').each(function () {
                            var th = $(this);
                            if ($.trim(th.val()).length &gt; 0) {
                                var ss = th.data('text').push($.trim(th.val()));
                                ss = eliminateDuplicates(ss);
                                $.data(th, 'text', ss);
                            }
                        });
                        $(':text').val('');
                    }
                }, 100);
            });
            var colors = ["#FFFFFF", "White"];
            $('fieldset :text').live('keyup change', function () {
                $(':radio').removeAttr('checked');
                $('img').filter(function () { return $(this).attr('inputid'); }).each(function () {
                    $(this).attr('href', "/radiobuttonstatic.png");
                });
                $(':radio').change();
                foc = $(this);
                $('#auto').detach();
                var thi = $(this), auto = eliminateDuplicates(thi.data('text'));
                $.each(auto, function (a) {
                    $('body').append('&lt;ul id="auto" style=""&gt;&lt;/ul&gt;');
                    $('#auto').css(dStyle);
                    $('#auto').append('&lt;li style="cursor:pointer;margin-top:3px;font-size:10px;padding-left:3px;padding-right:3px"&gt;' + auto[a] + '&lt;/li&gt;');
                    $('#auto').css({
                        left: thi.offset().left + thi.width() + 4 + "px",
                        top: thi.offset().top - 3 + "px",
                        width: "120px",
                        height: "auto"
                    });
                });

            });
            $(document).live('click', function (e) {
                $('#auto').detach();
            });
            $('#auto li').live('click', function () {
                foc.val($(this).text());
                var j = setTimeout(function () {
                    $('#auto').remove();
                }, 10);
            });
        });
    &lt;/script&gt;
</code></pre>

<p>Please help me on this, why it is not working. And please suggest me if I have followed any wrong programming approach.</p>
