jQuery - removing an alert stop code from working
<p>The code below works, but there is an issue with it.</p>

<p>That issue is that unless the alert(this.href); - (about line 11) is in the code the following function does not work.</p>

<pre><code>//There are pages which make up 2 chapters in this content
//We shall attempt to grab all the links from these pages
var c;
var chapters = new Array();
chapters[0] = "original/html/0/ID0EFJAE.html";  

//Loop through each page of links
$.each(chapters, function(key, value) { 
    $("#theContent").append("&lt;div class='chapterindex" + key + "'&gt;working&lt;/div&gt;");
    $(".chapterindex" + key).load(value + " .content");     

    alert(this.href);

    $(".chapterindex" + key + " div.link a").each(function(intIndex) {
            alert(".chapterindex" + key);
        });
    });
</code></pre>

<p>If I take the first alert out of line 11 then the last alert doesn't fire. What am I doing wrong?</p>
