Satch3000 Satch3000 - 7 months ago 13
jQuery Question

Synchonise 2 input fields, can it be done using jQuery?

Can jQuery synchronise or copy the text of one input field to another when input A is modified? For example:

<input id="input_A" type="text" /> ...If I type something here

<input id="input_B" type="text" /> ... It will be copied here

Can jQuery Do this?


Try this:

$("#input_A").bind("keyup paste", function() {

For jQuery 1.7+ use on:

$("#input_A").on("keyup paste", function() {

Example fiddle