jQuery Autolist

Unfortunately Autolist-plugin is no longer supporting newest jQuery and is deprecated.

What is it?

Small jQuery-plugin to generate neat text input of multiselect.

TODO/Changes

1.1.0 ?
More features?
 
1.0.0 (7.9.2011)
Changes .attr() to .prop() where used.
Added support for non-multiple SELECTs
Allows only one value to be picked.
 
0.9.9 (6.9.2011)
Plugin created. Enjoy.

License

MIT License

No requirements nor special terms.
Send me a hello and link to your project, if you feel like it.

Documentation

Methods and options are documented below.

DEPENDS ON jQuery UI!
Requires that <SELECT> has attribute multiple!.

Also notice that autolist supports jQuery UI's styles!

.autolist( options )

Description: Initialize autolist to SELECT

Options

width (integer)
Widget's width, optional
json (string)
JSON source for SELECT's data

JSON format

Please use array of objects with label, value and check.

Format example

                [
                    {
                        "label":"Arcus",
                        "value":"00010",
                        "check":true
                    },{
                        "label":"Beta",
                        "value":"90010",
                        "check":false
                    },{
                        "label":"Celcius",
                        "value":"90020",
                        "check":true
                    }
                ]
                

Examples

<head> stuff

        <script type="text/javascript" src="js/jquery-autolist.min.js"></script>
        <link href="css/jquery-autolist.css" rel="stylesheet" type="text/css" />
                

Example with options

        $('select[multiple]').autolist({width: '500px'});

Basic example

        $('#my-select').autolist();
Tags

Loading tags...
About author
Niko Hujanen
Turku, Finland
Send an email
LinkedIn Profile
GitHub Profile
Follow

Adverts