How to reload jquery dropkick object

后端 未结 6 974
执念已碎
执念已碎 2021-02-08 16:39

Im using a simple select list and the jquery.dropkick library to make it beautiful. Now i want to change that dropkick content after the corresponding select element has been ch

6条回答
  •  [愿得一人]
    2021-02-08 17:12

    I have faced the same issue and couldn't find a solution, but finally succeeded in getting this hack work.

    $select = $("#select1");
    $select.removeData("dropkick");
    $("#dk_container_select1").remove();
    
    $select.append("");
    $select.append("");
    
    $select.dropkick();
    

提交回复
热议问题