
A sheet worker does not have access to jQuery's $ identifier. Is it possible to dynamically create/destroy objects in a character sheet? What i'm trying to do is create roll buttons inside a container when a repeating section is changed, like this: on("change:repeating_agility change:repeating_will change:repeating_otherattribute", function(eventInfo) {
let out = "";
let changedgroup = eventInfo.sourceAttribute.split("_")[1];
getSectionIDs("repeating_"+changedgroup,function(idarray) {
idarray = idarray.map(function(x) { return "repeating_"+changedgroup+x; });
let idarray2 = [...idarray];
idarray = idarray.map(function(x) { return x+"_spec_name"; });
idarray2 = idarray2.map(function(x) { return x+"_spec_rating"; });
getAttrs([...idarray,...idarray2], function(values) {
idarray2.forEach(function(id) {
out += "<button class='sheet-spec-button' type='roll' value='&{template:imaroll} {{[[(@{"+changedgroup+"_rating}+"+values["repeating_"+changedgroup+id+"_spec_rating"]+")d6dl"+values["repeating_"+changedgroup+id+"_spec_rating"]+"]]}}'>"+values["repeating_"+changedgroup+id+"_spec_name"]+": "+values["repeating_"+changedgroup+id+"_spec_rating"]+"B</button>";
});
$("#spanout_"+changedgroup).html(out);
});
});
}); Which obviously doesn't work. The repeating section is designed to be hidden with a toggle, so as to not clutter the character sheet.