How to Use the multiple drop-down box of jQuery

Source: Internet
Author: User

How to Use the multiple drop-down box of jQuery

  

I. Basic Attributes

1. Select All or all, for example, part 1

CheckAllText default value: check all

UncheckAllText default value: uncheck all

$ ("Select"). multiselect ({

CheckAllText: "select all ",

UncheckAllText: "NONE"

});

2. Prompt information for the selected item, part 1

SelectedText default: # selected

$ ("Select"). multiselect ({

SelectedText: select [#] items, total [#] items"

});

3. The selected value, part 1 of the displayed content

$ ("Select"). find ("option: selected"). text ();

4. The key value corresponding to the selected item. The returned data format is as follows:

1, 2, 3, 6, 7

Var keys = $ ("# depart"). val ();

Ii. Basic events

Beforeopen events before the drop-down box is opened

Open

Events before the beforeclose drop-down box is closed

Close

Checkall all selected events

Uncheckall all deselected events

Click Event when one click is selected

Iii. Main Methods

Refresh control

CheckAll Check all checkboxes.

UncheckAll Uncheck all checkboxes.

GetChecked Returns an array of all the checked checkboxes.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.