Closed ghost closed 7 years ago
Hi @exyoris!
Currently, the keyboard needs to be bound to an element directly, no delegated binding, as more than one keyboard is permitted to be open at a time and each may have a different layout.
I ended up modifying a few things in the demo to get things working - updated demo
.clone(true)
to .clone()
so the event bindings and data are not copied over into the new row.$(function() {
var settings = {
usePreview: false,
position: {
of: '#keyboard-wrapper',
my: 'center top',
at2: 'center bottom',
offset: '0 20'
}
};
$('.keyboard').keyboard(settings);
var id = 0;
jQuery("#addrow").click(function() {
id++;
var row = jQuery('.samplerow tr').clone();
row.find("input:text").val("");
row.attr('id', id);
row.appendTo('#dynamicTable1');
row.find('.keyboard').keyboard(settings);
return false;
});
$('.remove').on("click", function() {
$(this).parents("tr").remove();
});
});
Thank you, Mottie! This did the trick. :)
I'm guessing this issue has been resolved, so I'm going to close it. If you continue to have problems, please feel free to continue the discussion in this thread.
Hey there, so I can't seem to submit or type inside the rows that are dynamically created.
https://jsfiddle.net/Lsact1tv/
I've already searched and found other topics about that, but they didn't help me. Any suggestions? Thank you! :)