I am using this code.
"use strict";
// Class definition
let KTSearch = function () {
// Private variables
let form;
// Init Select2
const initSelectXYZ = () => {
// Init Select2 --- more info:
$("[name="provincia_id"]").select2();
}
// Public methods
return {
init: function () {
form = document.getElementById("kt_search_form");
initSelectXYZ();
}
};
}();
// On document ready
KTUtil.onDOMContentLoaded(function () {
KTSearch.init();
});
Uncaught TypeError: $(...).select2 is not a function
Hi,
Sorry for the delay, and we miss looked into this issue. Could you please try to add the below code on top of this file?
require("select2");
Try adding the select2 script to your application.
<link href=" rel="stylesheet" />
<script src="