I want to delete all <div>
which id begins with xyz from the dom tree.
I know that this can be done with dojo.query and dojo.destroy but I never used this combination before.
I tried this but it doesn't work:
var divNodesWidgets = dijit.findWidgets('[id^="divNodes"]');
dojo.forEach(divNodesWidgets, function(d) {
d.destroyRecursive(true);
});
var UlWidgets = dijit.findWidgets('[id^="ulNodes"]');
dojo.forEach(UlWidgets, function(u) {
u.destroyRecursive(true);
});
var headingWidgets = dijit.findWidgets('[id^="h1Nodes"]');
dojo.forEach(headingWidgets, function(h) {
h.destroyRecursive(true);