jquery micro template

jquery micro template
 点击下载

A JS template methodology without seperate template container like TrimPath etc.

  1. <div id="test1" class="users"> 
  2.      <!for (var i=0;i<users.length;++i) 
  3.            {!> 
  4. <div onMouseOver="/*=users[i].color?'this.style.color=\''+users[i].color+'\';':''*/" id="user_<!=i!>" class='user'>Name:<a href="<!=users[i].name!>"><!=users[i].name!></a></div> 
  5.            <!} 
  6.      !> 
  7. <pre>'somthing' 
  8. else ...</pre> 
  9. </div> 
  10.  
  11. <script> 
  12. var data1={users:[{name:'name1.1'}, 
  13.                   {name:'name1.2', color:'yellow'} 
  14.                  ] 
  15.           }; 
  16. $('#test1').drink(data1); 
  17. </script> 

 

 

 

转载请注明:代码家园 » jquery micro template

评论列表(网友评论仅供网友表达个人看法,并不表明本站同意其观点或证实其描述)