Closed thearabbit closed 9 years ago
I try use event click of any btn, then change selected value of select2 object. but don't work.
click
btn
$('[name="address"]').select2({ val: 'PP' });
pl help me.
I think what you want is
$('[name="address"]').select2("val", "PP");
Thanks, but don't work. If I set setTimeout with 100 ms, it is work. I don't understand.
setTimeout
Maybe problem with pub/sub.
pub/sub
I try use event
click
of anybtn
, then change selected value of select2 object. but don't work.pl help me.