Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

optgroup instead of class names #51

Open
ghost opened this issue Nov 22, 2016 · 0 comments
Open

optgroup instead of class names #51

ghost opened this issue Nov 22, 2016 · 0 comments

Comments

@ghost
Copy link

ghost commented Nov 22, 2016

Hi there - I think this is different from the 'support optgroup' issue.
What I'm thinking is that instead of classnames as the hook for the secondary chained select box, it would be more semantic, cleaner and attractive I think to use optgroup for this.
For example:

<select id="mark" name="mark">
    <option value="">--</option>
    <option value="bmw">BMW</option>
    <option value="audi">Audi</option>
</select>
<select id="series" name="series">
    <optgroup label="BMW">
        <option value="series-3">3 series</option>
        <option value="series-5">5 series</option>
        <option value="series-6">6 series</option>
    </optgroup>    
    <optgroup label="Audi">
        <option value="a3">A3</option>
        <option value="a4">A4</option>
        <option value="a5">A5</option>
    </optgroup>    
</select>

For gracefull degradation It would be necessary to match the label to the selected TEXT not the VALUE ot the parent select box.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants