jquery - bootstrap-tags-input adding a class to the generated input -


i add class or other attributes input generated bootstrap

<input type="text" value=""> $('input').tags-input(); 

generates:

<div class="bootstrap-tagsinput">   <input type="text" placeholder="add tags" style="width: 8em !important;"> </div> 

i add class with: http://timschlechter.github.io/bootstrap-tagsinput/examples/#methods

input

returns tagsinput's internal , used adding tags. use add own typeahead behaviour example.

var $elt = $('input').tagsinput('input');

i don't seem understand how class added

thank you

firstly, tagsinput initialized

$("input").tagsinput(); 

the method tagsinput('input') returns input element other jquery methods can used

var $input = $("input").tagsinput('input'); $input.addclass('custom-class'); 

Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -