lundi 2 avril 2018

why created tags from jquery not working?

i want jquery making tag repeatdly.

so i tryed this code :

$('#image-up').on("click", function() {
  $('.image-btn-add').append($("#image-up").clone());
})
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="image-btn-add">
  <input type="file" id="image-up">
</div>

but, this code is working only first input file tag, i want apply clone tag.

(first input file from html is good working, but not appending from jquery tag)

what should i do?




Aucun commentaire:

Enregistrer un commentaire