We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 131d84b commit 6c97f66Copy full SHA for 6c97f66
README.md
@@ -1,2 +1,28 @@
1
# html-chain
2
A super small (only 2.7kB) javascript library to make html by chaining javascript functions.
3
+
4
+## Example
5
6
+```js
7
+var test = dom()
8
+ .add('div', {className: 'container'})
9
+ .contains('div', {className: 'header'})
10
+ .contains('h5', {className: 'headerTitle', text: 'This is a header'}).end()
11
+ .and('div', {className: 'content'})
12
+ .contains('p', {text: 'This is the content'}).end()
13
+ .end()
14
+ .build();
15
+```
16
17
+Produces -
18
19
+```html
20
+<div class='container'>
21
+ <div class='header'>
22
+ <h5 class='headerTitle'>This is a header</h5>
23
+ </div>
24
+ <div class='content'>
25
+ <p>This is the content</p>
26
27
+</div>
28
0 commit comments