Bootstrap input tags do not work using ready-made document

I have this function for boot input tags :

$(document).ready(function () {
    $('input').tagsinput({
        typeahead: {
            source: function (query) {
                return $.getJSON('citynames.json');
            }
        }
    })
});

But this plugin is not wrok. I think this plugin has a conflict with jQuery (document).ready. how can i fix this?

JSFIDDLE (for a better understanding of the code)

+4
source share
1 answer

try it

$(document).ready(function () {
    $('input').tagsinput({
        typeahead: {
            source: function (query, process) {
                process($.getJSON('citynames.json'));
            }
        }
    })
});
0
source

Source: https://habr.com/ru/post/1524530/


All Articles