jquery clone div and append it after specific div

后端 未结 4 514
被撕碎了的回忆
被撕碎了的回忆 2020-12-03 03:58

\"enter

Hi guys, from the picture above, I want to clone the div with id #car2 and app

4条回答
  •  春和景丽
    2020-12-03 04:57

    This works great if a straight copy is in order. If the situation calls for creating new objects from templates, I usually wrap the template div in a hidden storage div and use jquery's html() in conjunction with clone() applying the following technique:

    
    
    
    
    

    Hello [firstname] [lastname]

提交回复
热议问题