setContent

attaches html container to the template

void setContent(any node);

Parameters

nodeanyHTML node, or ID of html element that need to be attached

Example

//assuming that we have <div id="a12">Content</div>
$$("mytemplate").setContent( document.getElementById("a12") );
//or
$$("mytemplate").setContent( "a12");

Details

Works similar to the content property

Back to top