How to fill placeholder with filename from input field using jQuery?
<p>Like the topic states, i want to get the filename of selected file, and then fill in the filename to the placeholder, i don’t want to use the class since this are being cloned dynamically as well.</p>

<p>I have made a attempt finding the closest element, with no success.
Could this be done using closest() / find() or prev()? </p>

<pre><code>&lt;div class="col-md-10"&gt;
        &lt;div class="input-group"&gt;
            &lt;label class="input-group-btn"&gt;
                &lt;span class="btn btn-primary"&gt;
                    Browse &lt;input class="documentation" type="file" name="documentation[]" &gt;
                &lt;/span&gt;
            &lt;/label&gt;
            &lt;input value="" type="text" class="form-control file-placeholder" readonly&gt;
        &lt;/div&gt;
    &lt;/div&gt;

    &lt;script&gt;
        $('.documentation').change(function () {
            var filename = $(this).val();
            $(this).closest('.file-placeholder').find('.file-placeholder').val(filename);
        });
    &lt;/script&gt;
</code></pre>