添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Get 2024 Templates Mega Bundle! 14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

select2 on change event


Hi !
I'm using select element with data-kt-select2="true" , but when I declare on change event in my page KTUtil.onDOMContentLoaded , the event will not be trigger . Anyone know how to fix it ? (I'm using metronic laravel template and use laravel mix).

This is my html and js code :

<select class="form-select form-select-solid fw-bolder" id="birthdate_y" name="birthdate_y" data-kt-select2="true" data-allow-clear="true" data-hide-search="true" >
<option value=""></option>
<option value="1">1</option>
</select>



KTUtil.onDOMContentLoaded(function () {
$("#birthdate_y").on("change", function(){
console.log("in");
});
});


please help~~~ thx QQ