Created
November 25, 2012 21:06
-
-
Save arturoleon/4145331 to your computer and use it in GitHub Desktop.
Titanium Mobile: Remove all childrens recursively from an object
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function removeChildrens(objeto) { | |
for (i in objeto.children) { | |
var child=objeto.children[0]; | |
removeChildrens(child); | |
objeto.remove(child); | |
child=null; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment