trafficsland / dependent-dropdown
A multi level dependent dropdown JQuery plugin that allows nested dependencies.
Installs: 64
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Language:JavaScript
This package is not auto-updated.
Last update: 2025-05-05 17:48:54 UTC
README
Features
- Apply the plugin on a select element and set dependency to one or more other input / select elements (including dependency nesting).
- Automatically convert
select
inputs with classdepdrop
to dependent dropdowns. The plugin supports HTML5 data attributes to configure the dependent dropdown options. - Automatically initialize dependent dropdowns based on preselected values (useful for update scenario).
- Supports both
select
input with basicoptions
and select withoptgroups
. - Automatically lock/disable the dependent dropdown until dependent results are available.
- The plugin uses ajax call to the server to render the list of dependent options.
- Allows a loading indicator to be displayed in dependent select until the results are fetched from the server.
- Configure your own loading progress text to be displayed for each dependent dropdown before the results are fetched from the server.
- Display a placeholder label with an empty value. For
optgroups
automatically disable this option. - Triggers JQuery events for advanced development. Events currently available are
depdrop.init
,depdrop.change
,depdrop.beforeChange
,depdrop.afterChange
, anddepdrop.error
. - Size of the entire plugin is less than 4KB (about 3KB for the minified JS and 1KB for the minified CSS).
- Ability to configure HTML attributes of each
option
element via ajax response (for example dynamically disabling some dropdown options or adding styles).
Installation
Using Bower
You can use the bower
package manager to install. Run:
bower install dependent-dropdown
Using Composer
You can use the composer
package manager to install. Either run:
$ php composer.phar require trafficsland/dependent-dropdown "@dev"
or add:
"trafficsland/dependent-dropdown": "@dev"
to your composer.json file
License
dependent-dropdown is released under the BSD 3-Clause License. See the bundled LICENSE.md
for details.