Selector for only elements in containing div
<p>I have several divs that are generated dynamically after a file is uploaded. Each file upload creates a div in this format:</p>

<pre><code>&lt;div id="uploadifive-fileupload-queue" class="uploadifive-queue"&gt;
    &lt;div class="uploadifive-queue-item complete" id="uploadifive-fileupload-file-0"&gt;

        &lt;div class="inputs"&gt;

            &lt;input type="hidden" name="image_id" value="0"&gt;
            &lt;input type="text" name="alt-text"&gt;
            &lt;input type="submit" name="image_data_submit" value="Submit" /&gt;

        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>Every item uploaded increments the id of the uploadifive-queue-item class to uploadifive-fileupload-file-0, uploadifive-fileupload-file-1, uploadifive-fileupload-file-2, etc.</p>

<p>I dynamically fill the hidden image_id from the response, so each hidden image_id field will have a different numerical value corresponding to the image_id I have stored in the database. This looks like:</p>

<pre><code>'onUploadComplete'  : function(file, data) {    
     $('input[name=image_id]:last').val(data);
}
</code></pre>

<p>I am trying to fill out the alt-text input field with some text and then when clicking on the Submit button, it sends the command via ajax to the database where it updates the alt-text field in the database where the image_id matches.</p>

<p>The problem is I can't figure out how to make the Submit button only submit the image_id and alt-text that is in the same div container. Each div has a unique ID with an incremented number, but I'm not sure how to select that. How can I do it?</p>

<p>Basically, if the button in <code>uploadifive-fileupload-file-3</code> is submitted, I only want the image_id field from uploadifive-fileupload-file-3 to be submitted via ajax.</p>

<p>Here's how I have the jQuery ajax currently:</p>

<pre><code>$("button[name=image_data_submit]").click(function(){
        $.ajax({
            url: './update_image/',
            type: "POST",
            data: { 
                image_id: $("input[name=image_id]").val(), 
                alt_text: $("input[name=alt_texted]").val() 
            },
            success: function(response){
                console.log(response);
            }
        });
    });
</code></pre>

<p>I'd appreciate any help. Been stuck on this all day :/</p>
