I'm trying to create a ruby on rails project, and as part of this project I'm using this jQuery plugin to manage tags input. However the tag field works on first refresh but not after any page loads, I'm pretty sure this is a problem with turbolinks not running the js again.
So I installed this gem, and changed:
$(function() {
$("input[data-role=tagsinput], select[multiple][data-role=tagsinput]").tagsinput();
});
})(window.jQuery);
to:
$(document).ready(function() {
$("input[data-role=tagsinput], select[multiple][data-role=tagsinput]").tagsinput();
});
})(window.jQuery);
in bootstrap-tagsinput.js.
However this is still giving me the same issues. Any help fixing this would be great.
try 'turoblinks:load'
instead
$(document).ready(function(){
use:
$(document).on('turbolinks:load',function(){