nate-strauser / meteor-select2

Select2 bindings to meteor
MIT License
30 stars 24 forks source link

problem with selected value when onchange any btn? #8

Closed thearabbit closed 9 years ago

thearabbit commented 9 years ago

I try use event click of any btn, then change selected value of select2 object. but don't work.

$('[name="address"]').select2({
                val: 'PP'
            });

pl help me.

dkmooers commented 9 years ago

I think what you want is

$('[name="address"]').select2("val", "PP");

thearabbit commented 9 years ago

Thanks, but don't work. If I set setTimeout with 100 ms, it is work. I don't understand.

thearabbit commented 9 years ago

Maybe problem with pub/sub.