Summary
I use jQuery to clone a group div ("boxCollection") containing groups ("groupBox"), each of which contains a set of inputs. Inputs have change events bound to them in $(document).ready, but inputs inside cloned divs do not respond to event triggers. I cannot get this to work in IE7, IE8 or FF3.
Here is my sample code:
HTML:
<div class="boxCollection"><div class="groupBox" id="group_1"><input type="text"></input></div></div>
JQuery Events:
$(".groupBox[id*='group']").change(function(){
index = $(this).attr("id").substring(6);
if($("input[name='collection_"+index+"']").val() == "")
{
$("input[name='collection_"+index+"']").val("Untitled Collection "+index);
}
});
JQuery clone statement:
$(".boxCollection:last").clone(true).insertAfter($(".boxCollection:last"));
source
share