I want to clone/duplicate the typing of the first input of each column in to the child boxes of the same class/id.
For example, there\'re 5 columns of data. Each col
This line in your code is setting all the input boxes to readonly and preventing you from typing in the first box as well.
$('*[id^="box"]').val($this.val()).attr('readonly', true); //clone all inputs and set them readonly
If you add this line beneath it, it will allow you to continue typing in the first box.
$input1.attr('readonly', false);
Updated Fiddle: http://jsfiddle.net/be9br09j/2/
Updated Snippet
var $input1 = $(document).find('input[id^="box"]').filter(':visible:first'); //find the first input begins with *box or other same id???
$($input1).keypress(function() { //duplicate the first box typing
var $this = $(this);
window.setTimeout(function() { //delay a bit
if ($('#cloneAll').is(':checked')) { //if checkbox empty
$('*[id^="box"]').val($this.val()).attr('readonly', true); //clone all inputs and set them readonly
$input1.attr('readonly', false);
}
}, 0);
});
1.
2.
3.
4.
5.
.
.
.
100.