Cloned Select2 is not responding

前端 未结 13 2426
长发绾君心
长发绾君心 2020-11-29 03:51

I am trying to clone a row which contains select2 tool ,when i clone that row using jQuery the cloned select2 is not responding.In image given below first select2 which is o

13条回答
  •  误落风尘
    2020-11-29 04:24

    How to use jorar91 code.

    var $clone = $("#multiple_objects_with_select2").cloneSelect2();
    
    $($clone ).find('select').select2({
        width:'100%'
    });
    
    $("#some_place").append($clone);
    

提交回复
热议问题