destroy - How do I delete all div with an id that begins with xyz with dojo 1.8.3? -


i want delete <div> id begins xyz dom tree.

i know can done dojo.query , dojo.destroy never used combination before.

i tried 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); 

is destroying widget or element, if element try with:

    dojo.foreach(dojo.query('[id^="xyz"]'), function(entry,idx){      dojo.destroy(entry);     alert(entry + " destroyed"); }); 

or

dojo.query('[id^="xyz"]').foreach(dojo.destroy); 

Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -