Answers for "on change select2 jquery"

1

f.select on change jquery

$('select').on('change', function() {
  alert( this.value );
});

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>

<select>
    <option value="1">One</option>
    <option value="2">Two</option>
</select>
Posted by: Guest on August-18-2021
2

select2.org events

$('#mySelect2').on('select2:select', function (e) {
    var data = e.params.data;
    console.log(data);
});
Posted by: Guest on July-20-2020
0

select2 on change

<script>
  	$('#exampleSelect2').select2().on('change', function(){
		// ...
	});
</script>
Posted by: Guest on October-23-2021

Browse Popular Code Answers by Language