Appending large block of html with append()

后端 未结 11 1107
-上瘾入骨i
-上瘾入骨i 2021-01-31 10:09

Im trying to append a large block of text using jquery\'s append().

$(\'#add_contact_btn\').click(function(event) {
    event.preventDefault();

    var large =         


        
11条回答
  •  一个人的身影
    2021-01-31 10:35

    You can also clone the div with jQuery and then append the clone--way less messy.

    var accordionClone = $('.accordion_container').clone();
    $('#accordion_container').append(accordionClone);
    

提交回复
热议问题