html - JQuery drop down select value in another dropdown -
I have two selected boxes in my code, and I want to select the first box so that we can choose the default selection for the second box. What has been selected in the first.
This code is working by leaving the reality in view of the price tags in the first selection. I want to see the value in the default tag. For example, if the computer class is selected, then I want the second selection box to immediately select "adult".
Here you can see full HTML and JQuery code on JSfield:
This is my JQuery script:
$ (function () {$ ('Select #type') Val ($ (this) .val ())})})
$ (function () {$ ('select # type'). Change (function () {var defaultVal = $ (this). (": Selected " ) .rrr ('default'); $ ('select # age group'). Val (defaultVal);});})
Comments
Post a Comment