$(function () {
$("#shipping_method_0_flat_rate25").on("change", function () {
if ($("#shipping_method_0_flat_rate25").prop("checked")) {
$("#ship-to-different-address-checkbox").attr("checked", true);
} else {
$("#ship-to-different-address-checkbox").removeAttr("checked");
}
});
});
<form>
<input type="checkbox">
<select>
<option>1</option>
<option>2</option>
<option>3</option>
</select>
<button type="reset">Reset form from inside</button>
</form>
<button id="resetBtn">Reset outside</button>
const form = document.querySelector('form'),
resetBtn = document.getElementById('resetBtn');
resetBtn.addEventListener("click", () => form.reset())
Note: Changing the value of an input element using JavaScript, using .val() for example, won't fire the event.