How do I remove all tags in an input field below with jQuery?
<input class="form-control" id="videotags" data-role="tagsinput" placeholder="Video Tags" type="text"> //what I tried: <script>$("#videotags").remove();</script>
If you are using Bootstrap tagsinput try this:
tagsinput
$("#videotags").tagsinput('removeAll');
source
This work for me:
$('#videotags').tagsinput('removeAll');
Try this
$('#videotags').click(function() { var input = $(this); input.val(''); });
https://jsfiddle.net/joe_hart/7xrg242b/