Equivalent to .parent().parent().siblings() in jQuery
<p>I've been having a hard time getting the right selector and I've just now got it working by doing <code>.parent().parent().siblings()</code> , but I know there has to be a better way to get it without chaining it so much.</p>

<p>The div is added dynamically and this is the only reliable way I've found to select it:</p>

<pre><code>var current = $(".filename:contains('" + file.name + "')").parent().parent().siblings();
current.find("input[name=title]").val(obj.file_name);
</code></pre>

<p>This is the jsFiddle link: <a href="http://jsfiddle.net/Msnf9/8/" rel="nofollow">http://jsfiddle.net/Msnf9/8/</a></p>

<p>This is the HTML:</p>

<pre><code>&lt;div id="uploadifive-fileupload-queue" class="uploadifive-queue"&gt;
    &lt;div class="uploadifive-queue-item" id="uploadifive-fileupload-file-0"&gt;
        &lt;div class="span12 well"&gt;
            &lt;div class="row-fluid"&gt;
                &lt;div class="alert"&gt;
                    &lt;div class="filename"&gt;file-name-1.jpg&lt;/div&gt;
                    &lt;div class="fileinfo"&gt; - Completed&lt;/div&gt;
                &lt;/div&gt;
                &lt;div class="progress"&gt;
                    &lt;div class="bar"&gt;&lt;/div&gt;
                &lt;/div&gt;
            &lt;/div&gt;

            &lt;div class="row-fluid inputs"&gt;
                &lt;div class="span3"&gt;
                &lt;ul class="thumbnails"&gt;
                    &lt;li class="span12"&gt;
                      &lt;a href="#" class="thumbnail"&gt;
                        &lt;img src="http://placehold.it/260x180" alt=""&gt;
                      &lt;/a&gt;
                    &lt;/li&gt;
                  &lt;/ul&gt;
                &lt;/div&gt;
                &lt;div class="span9"&gt;
                    &lt;form class="form-horizontal"&gt;
                        &lt;fieldset&gt;
                            &lt;div class="control-group"&gt;
                                &lt;label class="control-label" for="file-name"&gt;File Name&lt;/label&gt;
                                &lt;div class="controls"&gt;
                                    &lt;span class="input-xlarge uneditable-input file-name" /&gt;&lt;/span&gt;
                                &lt;/div&gt;
                            &lt;/div&gt;
                            &lt;div class="control-group"&gt;
                                &lt;label class="control-label" for="file-dimensions"&gt;File Dimensions&lt;/label&gt;
                                &lt;div class="controls"&gt;
                                    &lt;span class="input-xlarge uneditable-input file-dimensions" /&gt;&lt;/span&gt;
                                &lt;/div&gt;
                            &lt;/div&gt;
                            &lt;div class="control-group"&gt;
                                &lt;label class="control-label" for="file-url"&gt;File URL&lt;/label&gt;
                                &lt;div class="controls"&gt;
                                    &lt;span class="input-xlarge uneditable-input file-url" /&gt;&lt;/span&gt;
                                &lt;/div&gt;
                            &lt;/div&gt;
                            &lt;div class="control-group"&gt;
                                &lt;label class="control-label" for="alt-text"&gt;Alt Text&lt;/label&gt;
                                &lt;div class="controls"&gt;
                                    &lt;input type="text" class="input-xlarge" placeholder="Alt text" name="alt-text" id="alt-text" /&gt;
                                &lt;/div&gt;
                            &lt;/div&gt;
                            &lt;input type="hidden" name="image_id" /&gt;
                            &lt;div class="form-actions"&gt;
                                &lt;button id="save" type="button" class="btn btn-primary"&gt;&lt;i class="icon-ok icon-white"&gt;&lt;/i&gt; Save&lt;/button&gt;
                                &lt;button id="delete" type="button" class="btn btn-inverse"&gt;&lt;i class="icon-trash icon-white"&gt;&lt;/i&gt; Delete&lt;/button&gt;
                         &lt;/fieldset&gt;
                    &lt;/form&gt;
                &lt;/div&gt;
            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
</code></pre>
