radiac/django-tagulous

How to call select2 explicitly?

BoPeng opened this issue · 1 comments

I have a situation in which a piece of HTML code containing data-tagulous is read through AJAX and I need to call

select2($('input[data-tagulous]'), true);

explicitly on the element. Assuming that all the relevant js files have been loaded (tagulous/lib/select2-4/js/select2.full.min.js, tagulous/adaptor/select2-4.js and tagulous/tagulous.js), how can I call select2 explicitly?

Thanks,

Figured it out:

Tagulous.select2($('input[data-tagulous]'), true)