initialize

Called once after the DK element is inserted into the DOM. The value of this is the Dropkick object itself.

initialize()

mobile

Whether or not you would like Dropkick to render on mobile devices.

mobile
Properties
mobile (boolean)

change

Called whenever the value of the Dropkick select changes (by user action or through the API). The value of this is the Dropkick object itself.

change()

open

Called whenever the Dropkick select is opened. The value of this is the Dropkick object itself.

open()

close

Called whenever the Dropkick select is closed. The value of this is the Dropkick object itself.

close()

"strict" - The search string matches exactly from the beginning of the option's text value (case insensitive).

"partial" - The search string matches part of the option's text value (case insensitive).

"fuzzy" - The search string matches the characters in the given order (not exclusively). The strongest match is selected first. (case insensitive).

search

bubble

Bubble up the custom change event attached to Dropkick to the original element (select).

bubble

Dropkick

Getting started

After you've cloned the repo you will need to add the library to your page. In the build/js folder use one of the two DropKick files given. One has a version number in the file name and the other is a version number-less version. You will also need to grab the css from build/css and load it on the page.

Once those files are imported into the page you can call DropKick on any HTMLSelectElement: new Dropkick( HTMLSelectElement, Options ); or new Dropkick( "ID", Options );. This returns the dropkick object to you. It may be useful for you to store this in a var to reference later.

If you're using jQuery you can do this instead: $('#select').dropkick( Options );

new Dropkick(select: any, options: opts, sel: elem): object
Parameters
select (any)
options (opts) See list of properties you can pass in here
sel (elem) HTMLSelect Element being passed.
Returns
object: DropKick Object for that select. You can call your methods on this if stored in a var
Example
```js
   // Pure JS
   var select = new Dropkick("#select");
 ```
```js
   // jQuery
   $("#select").dropkick();
 ```
Instance Members
disabled
form
length
multiple
options
selectedIndex
selectedOptions
value
add(elem, before)
item(index)
remove(index)
close()
open()
disable(elem, disabled)
hide(elem, hidden)
select(elem, disabled)
selectOne(elem, disabled)
search(pattern, mode, string)
focus()
reset(clear)
refresh()
dispose()