I made this example code: https://jsfiddle.net/gwpcfp89/
The question is about this click event:
var wrapper = $(".select-editable"); // Fields wrapper
$(wrapper).on('keypress', '#input1', function () {
var cs = $(this).val().length+1;
console.log( "total caracters:" + cs);
$('#mytext1').html('<option value="dummy01">dummy01</option><option value="dummy02">dummy02</option><option value="dummy03">dummy03</option>')
});
I use #input1
, #mytext1
, and I want the click to be dynamic.
For example: if I create four selects in the table, the fourth select should have the click event like the first select (#input4
and #mytext4
).
Is it possible?