var input = document.querySelector('input[data-role=tagsinput]'), tagify = new Tagify( input, { whitelist: #{tagsAvailableAsJSON}, autocomplete: true, enforeWhitelist: true}); input.style.display = 'none'; $(document).ready(function() { $("table").DataTable({ 'pageLength': 50, 'order': [[1, 'desc']]}); } );