I have two form inputs that I need have matching field content. Meaning if I enter text in one field it is the exact same on the other field (they are in separate forms).
I thought I could use .bind() to do it but my script would not allow my text to bind to another input.
var inp = $("#text1");
if ("onpropertychange" in inp)
inp.attachEvent($.proxy(function () {
if (event.propertyName == "value")
$("div").text(this.value);
}, inp));
else
inp.addEventListener("input", function () {
$("#text2").text(this.value);
}, false);
<input type="text" id="text1" />
<input type="text" id="text2" />
change
keyuptochangeif you don`t want to edit it letter by letter; jsfiddle there