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

Added support for the hidden attribute on options. #335

Merged
merged 1 commit into from
May 26, 2016
Merged

Added support for the hidden attribute on options. #335

merged 1 commit into from
May 26, 2016

Conversation

bengsfort
Copy link
Contributor

When a user has a hidden attribute on an option in their select, that options <li></li> will receive the following:

  • .dk-option-hidden class
  • aria-hidden="true" property

The .dk-option-hidden class just tacks on a display: none; to hide the option from view, so it doesn't do anything special.

In addition a .hide() method has been added so a user can hide/show an option dynamically. Basically just forked from the .disable() method, the new method accepts two args: elem (the index/option the user wants to hide) and hidden (boolean for whether or not to show or hide the element).

Two unit tests for the .hide() method have also been added.

@Robdel12 Robdel12 merged commit 8e86323 into Robdel12:master May 26, 2016
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

Successfully merging this pull request may close these issues.

None yet

2 participants