tuupola / jquery_chained

Chained Selects for jQuery and Zepto
https://appelsiini.net/projects/chained/
589 stars 283 forks source link

selects options preselection #39

Closed Serg10 closed 9 years ago

Serg10 commented 9 years ago

Hi!

I want to preselect selects option, for this I created a function in js that puts the selected = "selected" attribute to the options I need, but do not seem to work with the plugin.

Thank You!

tuupola commented 9 years ago

Use $.val() for setting select values.

Serg10 commented 9 years ago

I tried, but it only works in Firefox and sometimes ... I get the same result quecon other solutions I've tried

Y tried with: $.val() , $.attr(), $.prop

tuupola commented 9 years ago

You can also preselect options using the JSON as described in documentation.