11 months ago

Jquery prepend issue

Posted 11 months ago by Atef95

Hey guys I'm using jquery

I've a div that includes some inputs, I want to dupplicate it whenever I hit a button.. when the new content is dupplicated I want to add on the top of it another content ( X button) to give option to delete it but it didn't work... I tried using prepend.. here is my code


  var newProduct=$('.box-color').html();
  var newButton=$('.clicked').html();
// this is content that has to be inserted in the top of dupplicated one
var html="";
html+= '<div class="box-tools pull-right">';
html+='<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>';
html+=' <button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-remove"></i></button>';






Please sign in or create an account to participate in this conversation.