How to trigger jQuery change event in code
The parameterless form of the change() method triggers a change
event. You can write something like:
$(document).ready(function() {
$("#yourInitialElementID").change(function() {
// Do something here...
$(".yourDropDownClass").change();
});
});
For me
$('#element').val('...').change()
is the best way.
Note:
.change()
is deprecated in newer versions use.trigger('change')
instead.
Use the trigger() method
$(selector).trigger("change");