This repository was archived by the owner on Jan 30, 2021. It is now read-only.
forked from ilgilenio/Otag
-
Notifications
You must be signed in to change notification settings - Fork 0
.append
Alper Kürşat edited this page May 24, 2018
·
1 revision
.append( elements Array, reverse Boolean )
Appends element/s to an Element
.append doesn't create reliable(.parent/.View) connection between parent and children. To make connected append, use .has .has method
let Elem='Parent'.append([
'Child'.init(),
'Child2'.init()
]);
O.ready.then(b=>b.append(Elem)); //Append Elem to document.body<div class="Parent">
<div class="Child"></div>
<div class="Child2"></div>
</div>To append elements reverse ordered, set reverse true
let Elem='Parent'.append([
'Child'.init(),
'Child2'.init()
],true);
O.ready.then(b=>b.append(Elem)); //Append Elem to document.body<div class="Parent">
<div class="Child2"></div>
<div class="Child"></div>
</div>| ©️ Copyright | 2018 | |
|---|---|---|
| Otağ™ JS | ilgilenio® ⚙️ open source |