jquery drop-down box extension and landscaping plugin chosen

Source: Internet
Author: User

Chosen is a Select drop-down box that supports jquery to make the ugly, long select box look better and more convenient. Not only that, it expands the Select, adding the ability to automatically filter. It can group lists, and it can also disable certain selections.

First look at the effect of the plugin:

Let's take a look at its usage.

Introducing Core Files

1     <Linkrel= "stylesheet"href= "Docsupport/style.css">2     <Linkrel= "stylesheet"href= "Docsupport/prism.css">3     <Linkrel= "stylesheet"href= "Chosen.css">4     <Scriptsrc= "Jquery-1.6.min.js"type= "Text/javascript"></Script>5     <Scriptsrc= "Chosen.jquery.js"type= "Text/javascript"></Script>6     <Scriptsrc= "Docsupport/prism.js"type= "Text/javascript"CharSet= "Utf-8"></Script>

Building HTML

1     <SelectData-placeholder= "Choose a country ..."class= "Chosen-select"style= "width:350px;"TabIndex= "2">2     <optionvalue=""></option>3     <optionvalue= "states">States</option>4     <optionvalue= "Kingdom">Kingdom</option>5     <optionvalue= "Afghanistan">Afghanistan</option>6     <optionvalue= "Aland Islands">Aland Islands</option>7     <optionvalue= "Albania">Albania</option>8     <optionvalue= "New Caledonia">New Caledonia</option>9     <optionvalue= "New Zealand">New Zealand</option>Ten     <optionvalue= "Nicaragua">Nicaragua</option> One     <optionvalue= "Niger">Niger</option> A     <optionvalue= "Nigeria">Nigeria</option> -     <optionvalue= "Niue">Niue</option> -     <optionvalue= "Norfolk Island">Norfolk Island</option> the     <optionvalue= "Northern Mariana Islands">Northern Mariana Islands</option> -     <optionvalue= "Norway">Norway</option> -     <optionvalue= "Oman">Oman</option> -     <optionvalue= "Pakistan">Pakistan</option> +     <optionvalue= "Palau">Palau</option> -     <optionvalue= "Palestinian Territory, occupied">Palestinian Territory, occupied</option> +     <optionvalue= "Panama">Panama</option> A     <optionvalue= "Papua New Guinea">Papua New Guinea</option> at     <optionvalue= "Paraguay">Paraguay</option> -     <optionvalue= "Peru">Peru</option> -     <optionvalue= "Philippines">Philippines</option> -     <optionvalue= "Pitcairn">Pitcairn</option> -     <optionvalue= "Poland">Poland</option> -     <optionvalue= "Portugal">Portugal</option> in     <optionvalue= "Zambia">Zambia</option> -     <optionvalue= "Zimbabwe">Zimbabwe</option> to     </Select>

Write JS, implementation of the drop-down landscaping and filtering functions, here is the default, no parameters, more please refer to the example.

$ (". Chosen-select"). Chosen ();

: Baidu Cloud | Official Downloads

jquery drop-down box extension and landscaping plugin chosen

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.