jquery dynamically created objects not read
<p>I Was wondering if someone could give me a hand with a small issue im having... </p>

<p>Im dynamically creating checkboxes on a button click. The user then selects the checkboxes of his choice once complete clicks a button "save" which i then want to loop through all the checkboxes and radio buttons that are checked. Heres the code:</p>

<p>Codes that creates the checkboxes:</p>

<pre><code>$("#imgEdit").live("click", function(){
    var strEditSection = "&lt;a href='#' id='imgSave'&gt;OK&lt;/a&gt; | &lt;a href='#' id='imgCancel'&gt;Cancel&lt;/a&gt;";

    $("#album_edit").html(strEditSection);

    $(".image_container").each(function(){
        strDeleteImg = "&lt;div class='delete_IMG'&gt;&lt;a href='#' class='imgDelete'&gt;&lt;img src='images/del_img.gif' border='0' alt='Delete Picture' /&gt;&lt;/a&gt;&lt;/div&gt;";
        strDeleteChk = "&lt;div class='delete_IMG_chk'&gt;&lt;input type='checkbox' class='imgDeleteChk' /&gt;&lt;/div&gt;";
        strProfileImg = "&lt;div class='profile_IMG'&gt;&lt;input type='radio' name='rdoProfileImg' class='imgProfile' /&gt;Set Profile Picture&lt;/div&gt;";

        $(this).append(strDeleteImg);
        $(this).append(strDeleteChk);
        $(this).append(strProfileImg);
    });
});
</code></pre>

<p>Code with each statement that doesnt work:</p>

<pre><code>$("#imgSave").live("click", function(){
    $.fn.resetImageScreen();

    alert($(":checkbox").length);
    alert($(":radio").length);

    //Process all images to be deleted
    var del_thumbs = new Array();
    var del_IMGS = new Array();
    var delCounter = 0;
    $(".imgDeleteChk:checked").each(function(){
        alert("Delete Works");
        del_thumbs[delCounter] = $(this).parents(".image_container").find(".img_gallery").attr("src");
        del_IMGS[delCounter] = $(this).parents(".image_container").find(".lightBox").attr("href");

        delCounter++;
    });

    //Get profile image
    var prof_IMG;
    $(".imgProfile:checked").each(function(){
        alert("profile Works");
        prof_IMG = $(this).parents(".image_container").find(".img_gallery").attr("src");
    });

    $.ajax({
        type: "POST",
        url: "ajax/mod_images.php",
        dataType: "text",
        data: "del_IMGS=" + del_IMGS + "&amp;del_thumbs=" + del_thumbs + "&amp;prof_IMG=" + prof_IMG,
        async: false,
        success: function(response) {
            alert(response);
            $(".delete_IMG:checked").each(function(){
                $(this).parents(".image_container").hide("slow");
            });
        }
    });
});
</code></pre>

<p>however this isnt working, note that i put alerts to test that it hits the loop but it never executes however if i place the alert just before the each statements it does execute meaning the event is fired properly... Also i checked how many checkboxes and radio buttons are ont he page and it returns 0. If anyone has any idea why it might be doing this i would greatly appreciate your help!</p>

<p>Thanks in advance!!</p>
