I am using it in multiples modal items, with the same class,
but each modal has it's datas, so if i open one modal, and open another onea again, then it would appeared twice, if i open another modal again it would again appeared, i used empty(); function to empty it but it does not work.
i am using it direct from ajax
I am using it in multiples modal items, with the same class, but each modal has it's datas, so if i open one modal, and open another onea again, then it would appeared twice, if i open another modal again it would again appeared, i used empty(); function to empty it but it does not work. i am using it direct from ajax
<select name="category" id="edit-wish-cats" class="wide"> </select>
this is the html
` function initSelect2(id, type, pid ='') {
}`
this is the JS in function i called function here
initSelect2('edit-wish-cats', 'wishlists_types', data.wish_cat);