Select2 jQuery plugin is easy to add on the <select > element. Need to call the select2() method on the selector to initialize.
If you adding select2 on a class or select element and when you add an element dynamically then select2 is not initialized on that element.
In this tutorial, I show how you can initialize select2 on dynamically created HTML <select > element using jQuery.
I am loading select2 data using jQuery AJAX in the example.