add more button dont work in wordpress dashboard
<p>im working on custom post in wordpress, in this custom post i wanna add many photos using wp_attachment the problem im having here is that when i click addmore nothing happen, its like if wordpress is ignoring my jquery file
my code</p>

<pre><code>&lt;div class="col-sm-9"&gt;
            &lt;input type="file" name="aduploadfiles[]" id="uploadfiles2" size="35" class="form-control" /&gt;         
            &lt;input type="button" id="add_more2" class="upload" value="add more photo"/&gt;
&lt;/div&gt;
</code></pre>

<p>and this is the javascript im using</p>

<pre><code> var abc = 0; //Declaring and defining global increement variable

$(document).ready(function() {

//To add new input file field dynamically, on click of "Add More Files" button below function will be executed
    $('#add_more2').click(function() {
        $(this).before($("&lt;div/&gt;", {id: 'uploadfiles2'}).fadeIn('slow').append(
                $("&lt;input/&gt;", {name: 'aduploadfiles[]', type: 'file', id: 'aduploadfiles',size:'35', class:'form-control'})
                ));
    });

//following function will executes on change event of file input to select different file   
$('body').on('change', '#file', function(){
            if (this.files &amp;&amp; this.files[0]) {
                 abc += 1; //increementing global variable by 1

                var z = abc - 1;
                var x = $(this).parent().find('#previewimg' + z).remove();
                $(this).before("&lt;div id='abcd"+ abc +"' class='abcd'&gt;&lt;img id='previewimg" + abc + "' src=''/&gt;&lt;/div&gt;");

                var reader = new FileReader();
                reader.onload = imageIsLoaded;
                reader.readAsDataURL(this.files[0]);

                $(this).hide();
                $("#abcd"+ abc).append($("&lt;img/&gt;", {id: 'img', src: 'x.png', alt: 'delete'}).click(function() {
                $(this).parent().parent().remove();
                }));
            }
        });

//To preview image     
    function imageIsLoaded(e) {
        $('#previewimg' + abc).attr('src', e.target.result);
    };

    $('#upload').click(function(e) {
        var name = $(":file").val();
        if (!name)
        {
            alert("First Image Must Be Selected");
            e.preventDefault();
        }
    });
});
</code></pre>

<p>this works fine when i try it in a wordpress pages but in dashboard itdoesn't want to work even my javascript is loaded</p>