select on change value jquery code example

Example 1: select onchange get value jquery

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

//or

$("#the_id_select").change(function(){
   alert( this.value );
});

Example 2: on change jquery

$("input").change(function(){
  alert("The text has been changed.");
});

Example 3: jQuery change select value

$("#mySelectElementID").val("my_new_value"); //change selected option/value with jQuery

Example 4: jquery on element change

// On element change.
$('mydiv').bind('DOMSubtreeModified', function () {
  console.log('changed');
});