Reloading dropkick plugin

Faced the issue of reloading a dropkick select as there was no method specified in the documentation of the plugin, but finally succeeded in getting this hack work.

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

 $select.append("<option>opt4</option>");  
 $select.append("<option>opt5</option>");
 $select.dropkick();  
Share