Jquery help needed- infinite loop?
<p>i have a problem with this code:</p>

<pre><code>    var par = [];
    $('a[name]').each(function() {
        if (($(this).attr('name')).indexOf("searchword") == -1) {
            par.push($(this).attr('name'));
            $('.content').empty();
            for (var i = 0; i &lt; par.length; i++) {
                $(".content").append('&lt;a id="par" href="#' + par[i] + '"&gt;' + par[i] + '&lt;/a&gt;&lt;br /&gt;');
            }
        }
    });
</code></pre>

<p>It causes ie and firefox to popup the warning window "Stop running this script". But it happens only when there is a  very very large amount of data on page. Any ideas how to fix it?</p>
