JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<input id="txt1" type="text">
<br>
<input id="txt2" type="text">

JavaScript

$("#txt1").on("input", function() {
    alert("Change1");
});

$("#txt2").on("input", function() {
		$("#txt1").val('').trigger('input');
    alert("Change2");
});