jQuery duplicate DIV into another DIV

后端 未结 5 736
北海茫月
北海茫月 2020-11-29 00:46

Need some jquery help copying a DIV into another DIV and hoping that this is possible. I have the following HTML:

  
5条回答
  •  -上瘾入骨i
    2020-11-29 01:22

    $(document).ready(function(){  
        $("#btn_clone").click(function(){  
            $("#a_clone").clone().appendTo("#b_clone");  
        });  
    });  
    .container{
        padding: 15px;
        border: 12px solid #23384E;
        background: #28BAA2;
        margin-top: 10px;
    }
      
      
      
    jQuery Clone Method 
     
    
    
      
     
    

    This is simple example of clone method.

    Note:Click The Below button Click Me

    For more detail and demo

提交回复
热议问题