I am using Select2 loaded through a CDN. The first time, it works, but then it reverts to a regular select box (losing the Select2 dropdown). We are on WordPress and using the Toolset plugin to create the options.
Here is the external .js:
jQuery(function($){
$('.js-wpv-filter-trigger').select2();
});
$(document).ready(function() {
jQuery(’.js-wpv-filter-trigger’).select2();
});
I have also tried just ‘select’ instead of the class name ‘.js-wpv-filter-trigger’ and it behaved the same way.
The two screenshots show the console on load (when Select2 is working) and after the first selection (When it is not loading).