November 4, 2024 at 5:01 am
#10045307
Keymaster
Hello, to initialize the select2 you need to run this code:
// Select2
(function($) {
'use strict';
if ( $.isFunction($.fn[ 'select2' ]) ) {
$(function() {
$('[data-plugin-selectTwo]').each(function() {
var $this = $( this ),
opts = {};
var pluginOptions = $this.data('plugin-options');
if (pluginOptions)
opts = pluginOptions;
$this.themePluginSelect2(opts);
});
});
}
}).apply(this, [jQuery]);
Make sure the HTML has all the attributes as our examples.
Kind Regards.