How to solve : select2 jquery not work after clone

preview_player
Показать описание
i have select2 html ement, when i clone() using jquery.. it not work..
this video will help you how to solve that problem.

just re-define $('.select2_opt').select2() after append()

---

see this video for details.
Рекомендации по теме
Комментарии
Автор

Amazingly, it works for the latest version.
Thanks ...

ZeroArray
Автор

It worked very well for me... best solution I found so far. Congrats

willdoyoutube
Автор

This works only if you didn't already selected an option. If you select an option and then clone - cloned select don't work - you choose an option and it doesn't show it, just stays with the placeholder text.

IvayloStankov
Автор

Thank You Very Much Bro You Have Solved My Issue

anilparmar
Автор

the value of old select2 was not copied to new select2

kiani
Автор

I really appreciate your help, thanks a lot :)

muhamadalfin
Автор

i have tried to append after append i have use am getting error

arunfindlogics