I am using Select2 with another plugin that includes a “reset” button to convert the form back to its initial state. The plugin targets the original select field not the Select2 dropdown. I am wondering how I detect this change to manually revert the Select2 dropdown back to its initial state (the same value as what is selected on the original select field).
The following did not work:
document.getElementById(“originalID”).addEventListener(“input”, …
document.getElementById(“originalID”).addEventListener(“change”, …
$("#originalID").on(“input”, …
$("#originalID").on(“change”, …
$("#originalID").change( …