3 ms·
I have had this in my toolkit https://gitlab.com/teknopaul/xgenjs https://gitlab.com/teknopaul/xgenjs Gives me neat html in jQuery syntax. $(...).create("div
by teknopaul 6y ago
I have had this in my toolkit
https://gitlab.com/teknopaul/xgenjs https://gitlab.com/teknopaul/xgenjs
Gives me neat html in jQuery syntax.
$(...).create("div.foo#my-id/input{type=radio}");
Results in code that is just js, no template needed and no data binding.
$(...).create(...).text(quxx).data("foo", baa);
N.b. create() and most Jquery methods return a nodelist so chaining is easy.
I can work on sets as easily as nodes.
create("input[5]").addClass("btn btn-primary").click(...)
Wrote it years before the framework wars and never got sold on any of them.
I prefer code you can see, but I imagine thats not to everone's taste.