diff options
| author | Misko Hevery | 2010-04-05 11:46:53 -0700 |
|---|---|---|
| committer | Misko Hevery | 2010-04-05 11:46:53 -0700 |
| commit | 7a4b48020688060debe9cb0f9c17615d7585cbe7 (patch) | |
| tree | 48a5b1d8cf92bb272028a106ab9ea3ec16f477a2 /src/jqLite.js | |
| parent | 4bfa4e230d5ebdd582068effe7f4f1b60c43093a (diff) | |
| download | angular.js-7a4b48020688060debe9cb0f9c17615d7585cbe7.tar.bz2 | |
added ng:switch widget
Diffstat (limited to 'src/jqLite.js')
| -rw-r--r-- | src/jqLite.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/jqLite.js b/src/jqLite.js index ec77a6fb..f8ed4d7d 100644 --- a/src/jqLite.js +++ b/src/jqLite.js @@ -109,6 +109,10 @@ JQLite.prototype = { this[0].parentNode.replaceChild(jqLite(replaceNode)[0], this[0]); }, + append: function(node) { + this[0].appendChild(jqLite(node)[0]); + }, + remove: function() { this.dealoc(); this[0].parentNode.removeChild(this[0]); @@ -182,6 +186,9 @@ JQLite.prototype = { html: function(value) { if (isDefined(value)) { + for ( var i = 0, children = this[0].childNodes; i < children.length; i++) { + jqLite(children[i]).dealoc(); + } this[0].innerHTML = value; } return this[0].innerHTML; |
