Skip to content

Instantly share code, notes, and snippets.

@pedrocss
Created May 2, 2012 19:24
Show Gist options
  • Save pedrocss/2579506 to your computer and use it in GitHub Desktop.
Save pedrocss/2579506 to your computer and use it in GitHub Desktop.
Delete all elements from a div with dojo.js
function deleteChilds(idDiv) {
var node = dojo.byId(idDiv);
while (node.hasChildNodes()) {
node.removeChild(node.lastChild);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment