tiny-put.js - Selection to DOM for tinyJS

tiny-put.js adds the Selection-Method .p(), which puts selected nodes into the DOM.

Download

tiny-put.js [582b] - tiny-put-min.js.gz [189b]

Hint

The t.().p()-Method requires only tiny.js. Other scripts are not necessary.

Usage

The Method .p() takes one or two arguments. If only a node is given, the selection will be appended inside it. If prefixed with another numerical argument, the action changes: if it is a 0, the node will be replaced by the selection, a 1 makes it prepending the selection inside and a 2 outside the node.