I’ve a question related to a select element and jquery.
I currently have a change event so the changeShippingForm function gets called when the select element value has been changed, this is working just fine.
But I also want the change event fired at onload. How can I achieve this?
$(document).ready(function() {
$('#shippingType').change(changeShippingForm);
});
function changeShippingForm() {
// do some stuff
}
use
.trigger()help.or even shorter, use the shortcut: