html - Alert is not working on tags input bootstrap using jquery -
jquery alert not working tags input
bootstrap input field. html:
<input type="text" name="cities" class="form-control newcity" data-role="tagsinput" />
jquery:
$(document).on('keyup mouseup', ".newcity", function(e) { e.preventdefault(); alert('hello'); });
i've tried keyup
,mousedown
,mouseup
,mouseout
nothing working.
js fiddle link : here
any suggestions, please!
because not doing in input.
your input hidden , bootstrap adding element in place of input.
inspect input can see this.
see demo: fiddle
$(document).on('keyup', ".bootstrap-tagsinput", function(e) { alert('hello'); e.preventdefault(); });
Comments
Post a Comment