How to remove text input when button is clicked
<p>I have a jquery function below when when an upload has been completed, it will store the name of the file in a string and it's id in a text input. Now at bottom of function, if the user clicks on the <code>deletevideofile</code> button, then it is able to remove the file name which is fine but my question is how can I remove the text input? I can't seem to get the text input to be removed.</p>

<p>Below is code:</p>

<pre><code>function stopVideoUpload(success, videoID, videofilename){

      var result = '';
      videocounter++;

      if (success == 1){
         result = '&lt;span class="videomsg'+videocounter+'"&gt;The file was uploaded successfully&lt;/span&gt;';
          $('.listVideo').eq(window.lastUploadVideoIndex).append('&lt;input type="text" name="vidid" value="' + videoID + '" /&gt;');
          $('.listVideo').eq(window.lastUploadVideoIndex).append('&lt;div&gt;' + htmlEncode(videofilename) + '&lt;button type="button" class="deletefilevideo" video_file_name="' + videofilename + '"&gt;Remove&lt;/button&gt;&lt;br/&gt;&lt;hr/&gt;&lt;/div&gt;');      }

  var _videocounter = videocounter;

$('.listVideo').eq(window.lastUploadVideoIndex).find(".deletefilevideo").on("click", function(event) {
    var video_file_name = $(this).attr('video_file_name');

    jQuery.ajax("deletevideo.php?videofilename=" + video_file_name)
        .done(function(data) {

        $(".videomsg" + _videocounter).html(data);
    });

    $(this).parent().remove();
});


      return true;   
}
</code></pre>
