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

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

python - Pygame screen.blit not working -

c# - Web API response xml language -