javascript html object model and template engine

Posted by ais on Stack Overflow See other posts from Stack Overflow or by ais
Published on 2010-05-25T10:34:11Z Indexed on 2010/05/25 10:41 UTC
Read the original article Hit count: 308

Filed under:
|
|
|
|

I am looking something like

var items = [1,2];
var html = div(
ul({id:"some-id", class:"some-class"})(items.each(function(item){
 return li(item);
})
);

html == "<div><ul id='some-id' class='some-class'><li >1</li><li>2</li></ul></div>"

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about html