javascript - create reinit function for a script -
i'm using http://timschlechter.github.io/bootstrap-tagsinput/examples/ let user add tags cannot make working future element.
demo: http://jsfiddle.net/aydoywlq/
<div class="wrapper"> <input data-role="tagsinput" type="text" /> </div> <button>add row</button> $('button').click(function() { $('.wrapper').append($('input').clone()); });
since plugin doesn't have reinit
function, perhaps have create one? begin?
you can use .tagsinput()
constructor creating new tagsinput element manually.
$(item).tagsinput();
i have changed code little creates empty object because clone()
copied entered values well.
here jsfiddle.
Comments
Post a Comment