|
|
|
|
|
by jacobr
5022 days ago
|
|
A simple helper function makes DOM manipulation non-painful as well. One example is https://gist.github.com/1532562 or my fork https://gist.github.com/3524145 It's used like this: el ( tagName, properties, children )
Working with data structures is easy, children is just an array which can be the results of something like data.map() turning the data into elements. |
|
An added benefit is that it's very easy to attach events or other javascript properties to any object in the hierarchy.