IAM使用jQuery的和想要做下面书面DOM操作
//this is a template
<div class='main'>
<div class='header'>Some Text</div>
<div class='data'>
// data goes here
</div>
</div>
// DOM
--------dom here-------------
<div id='red1' class='red'></div>
-----more dom (template is here)------------
我想是,绑定模板的任何元素(可以说ID = RED1 )得到如下所示的dom
//下面是新的dom
--------dom here-------------
<div class='main'>
<div class='header'>Some Text</div>
<div class='data'>
// element is wrapped with template
<div id='red1' class='red'></div>
</div>
</div>
-----more dom (**template is still here**)------------