I am using a plugin called, ajaxfileupload https://github.com/jfeldstein/jQuery.AjaxFileUpload.js
My problem is that when I dynamically append an input file, the plugin events are not applied to that newly appended input file.
This is how the plugin is being called on click of the file input:
$("#mcq_option_list input[type=file], #question_name input[type=file], #test").ajaxfileupload({
This is my append function:
$(this).before('<div class="answer_div"><input id="'+new_num+'" class="rb" type="radio" value="'+new_num+'"><label for="'+new_num+'" class="mc_label"><strong class="abcdWrapper">'+next_letter+'</strong></label><div class="fake-input"><input type="text" class="long_input" placeholder="Enter Sub Option here..." name="data[Quiz][option][]" autocomplete="off"><span></span><div class="inputWrapper"> Upload Image<input class="fileInput" type="file" name="data[Quiz][image]['+new_num+']" id="test"></div></div><a href="#" class="delete-scale-question"></a></div>');
Thanks for the help in advance.