Skip to content

Latest commit

 

History

History
9 lines (9 loc) · 256 Bytes

code_other.md

File metadata and controls

9 lines (9 loc) · 256 Bytes

Check select is has data select2 ? if have destroy before create new thing

// remove initial value select 2
if ($('select').data('select2')) {
   $('select').select2('destroy');
}
// create initial value select2 again
$(".select2").select2();