JS/JQuery: I Can't get the loop right
<pre><code>$(document).ready(function() {
    $("#main-rss-link").click(function() {
        $("#main-rss-link").toggleClass('on'), $("#subscribe-list").slideToggle();
    });
    var a = $("li.comment").attr("id");
    var b = $("li.comment[id='" + a + "']");
    var c = $("li.comment &gt; div.comment-body div &gt; p &gt; a").attr("href");
    if ($.each('#' + a == c)) {
        var d = $("li.comment &gt; div.comment-body div &gt; p &gt; a[href='" + c + "']");
        var e = document.createElement("ul");
        $(e).addClass("children").appendTo(b);
        d.parents("li").appendTo(e);
        $("li ul li div.reply").remove();
    };
});
</code></pre>

<p>I want it to loop through all of my comments, but it only affects the first one it finds.</p>
