1.0.3 • Published 6 years ago

jquery-cascading-select v1.0.3

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

jquery-cascading-select

npm version npm downloads David

Unlimited level cascading select

Installation

npm

npm install jquery-cascading-select --save

bower

bower install jquery-cascading-select --save

Usage

See demo

API

Init

$('level 1 select').cascadingSelect(options)

Options

Nametypedefaultdescription
subSelectsstring arrayjQuery selectors for sub selects
datanode arraymodel of option tree
placeholderstringfalsetext to show when no option selected
placeholderWhenEmptystringfalsetext to show when no option available

Node format

A node describes an option(its text, value, sub options) by one of following formats:

  • Leaf

    • object {text, value?}, e.g. { text: 't', value: 'v' }, { text: 't' } expands to { text: 't', value: 't' }
    • string, e.g. 't' expands to { text: 't', value: 't' }
  • Parent