I have this jquery code below and I need it to attach events on controls as the controls are created dynamically.
Right now they are set for a specific control.
Thanks
$(document).on("click", "#day1Header", function () {
$("#day1Details").slideToggle("normal");
$(".expandDay1Details").html($(".expandDay1Details").html() == 'CLOSE' ? 'EDIT' : 'CLOSE');
});
$(document).on("click", "#day2Header", function () {
$("#day2Details").slideToggle("normal");
$(".expandDay2Details").html($(".expandDay2Details").html() == 'CLOSE' ? 'EDIT' : 'CLOSE');
});
$(document).on("click", "#day3Header", function () {
$("#day3Details").slideToggle("normal");
$(".expandDay3Details").html($(".expandDay3Details").html() == 'CLOSE' ? 'EDIT' : 'CLOSE');
});