jquery自定义带radio单选按钮的下拉列表插件

所属分类: 网页特效-表单美化    2023-08-31 02:05:07

jquery自定义带radio单选按钮的下拉列表插件 ie兼容6
 查看演示  登录后下载 温馨提示
登录会员即可享受免费下载
 我要建站

jquery自定义带radio单选按钮的下拉列表插件(共3个文件)

    • jdbss_dropdown.css
    • index.html
    • jdbss_dropdown.js

使用方法

  var theData = [
         {
             "name": "Alabama",
             "abbreviation": "AL"
         },
         {
             "name": "Alaska",
             "abbreviation": "AK"
         },
         {
             "name": "American Samoa",
             "abbreviation": "AS"
         },
         {
             "name": "Arizona",
             "abbreviation": "AZ"
         },
         {
             "name": "Arkansas",
             "abbreviation": "AR"
         },
         {
             "name": "California",
             "abbreviation": "CA"
         },
         {
             "name": "Colorado",
             "abbreviation": "CO"
         },
         {
             "name": "Connecticut",
             "abbreviation": "CT"
         },
         {
             "name": "Delaware",
             "abbreviation": "DE"
         },
         {
             "name": "District Of Columbia",
             "abbreviation": "DC"
         },
         {
             "name": "Federated States Of Micronesia",
             "abbreviation": "FM"
         },
         {
             "name": "Florida",
             "abbreviation": "FL"
         },
         {
             "name": "Georgia",
             "abbreviation": "GA"
         },
         {
             "name": "Guam",
             "abbreviation": "GU"
         },
         {
             "name": "Hawaii",
             "abbreviation": "HI"
         },
         {
             "name": "Idaho",
             "abbreviation": "ID"
         },
         {
             "name": "Illinois",
             "abbreviation": "IL"
         },
         {
             "name": "Indiana",
             "abbreviation": "IN"
         },
         {
             "name": "Iowa",
             "abbreviation": "IA"
         },
         {
             "name": "Kansas",
             "abbreviation": "KS"
         },
         {
             "name": "Kentucky",
             "abbreviation": "KY"
         },
         {
             "name": "Louisiana",
             "abbreviation": "LA"
         },
         {
             "name": "Maine",
             "abbreviation": "ME"
         },
         {
             "name": "Marshall Islands",
             "abbreviation": "MH"
         },
         {
             "name": "Maryland",
             "abbreviation": "MD"
         },
         {
             "name": "Massachusetts",
             "abbreviation": "MA"
         },
         {
             "name": "Michigan",
             "abbreviation": "MI"
         },
         {
             "name": "Minnesota",
             "abbreviation": "MN"
         },
         {
             "name": "Mississippi",
             "abbreviation": "MS"
         },
         {
             "name": "Missouri",
             "abbreviation": "MO"
         },
         {
             "name": "Montana",
             "abbreviation": "MT"
         },
         {
             "name": "Nebraska",
             "abbreviation": "NE"
         },
         {
             "name": "Nevada",
             "abbreviation": "NV"
         },
         {
             "name": "New Hampshire",
             "abbreviation": "NH"
         },
         {
             "name": "New Jersey",
             "abbreviation": "NJ"
         },
         {
             "name": "New Mexico",
             "abbreviation": "NM"
         },
         {
             "name": "New York",
             "abbreviation": "NY"
         },
         {
             "name": "North Carolina",
             "abbreviation": "NC"
         },
         {
             "name": "North Dakota",
             "abbreviation": "ND"
         },
         {
             "name": "Northern Mariana Islands",
             "abbreviation": "MP"
         },
         {
             "name": "Ohio",
             "abbreviation": "OH"
         },
         {
             "name": "Oklahoma",
             "abbreviation": "OK"
         },
         {
             "name": "Oregon",
             "abbreviation": "OR"
         },
         {
             "name": "Palau",
             "abbreviation": "PW"
         },
         {
             "name": "Pennsylvania",
             "abbreviation": "PA"
         },
         {
             "name": "Puerto Rico",
             "abbreviation": "PR"
         },
         {
             "name": "Rhode Island",
             "abbreviation": "RI"
         },
         {
             "name": "South Carolina",
             "abbreviation": "SC"
         },
         {
             "name": "South Dakota",
             "abbreviation": "SD"
         },
         {
             "name": "Tennessee",
             "abbreviation": "TN"
         },
         {
             "name": "Texas",
             "abbreviation": "TX"
         },
         {
             "name": "Utah",
             "abbreviation": "UT"
         },
         {
             "name": "Vermont",
             "abbreviation": "VT"
         },
         {
             "name": "Virgin Islands",
             "abbreviation": "VI"
         },
         {
             "name": "Virginia",
             "abbreviation": "VA"
         },
         {
             "name": "Washington",
             "abbreviation": "WA"
         },
         {
             "name": "West Virginia",
             "abbreviation": "WV"
         },
         {
             "name": "Wisconsin",
             "abbreviation": "WI"
         },
         {
             "name": "Wyoming",
             "abbreviation": "WY"
         }
     ];

    $("#example").jdbssDropdown({
        datasource: "json",
        data: theData,                                      // json formatted data
        indexcolumn:1,                                      // zero based column number that contains the index
        valuecolumn: 0,                                     // zero based column number that contains the value
        showindex: true,                                    // show the index value or hide
        bootstrapcol: ["col-9", "col-2"],                   // Must be at least 1 less than 12
        dataclass: [],      // Array of classes to be applied to the data columns
        headingclass: [],     // Array of classes to be applied to the data columns
        headings: ["State", "Abbr"],                        // Arry of text values for use as the Column headings
        display: {
                caret: "bootstrap",
                virtual_width: "300px",
                display_width: "container"
            },

        dropdownopened_callback: opened,          // javascript function to be called when the dropdown is opened   yourcontrol(ctrl)
        dropdownclosed_callback: closed,          // javascript function to be called when the dropdown is closed   yourcontrol(ctrl)
        rowselected_callback: selected              // javascript function to be called when a row is selected        yourcontrol(ctrl)
    });

     function opened(ctrl) {
     }
     function closed(ctrl) {
     }
     function selected(ctrl) {
     }

站长提示:
1. 苦力吧素材官方QQ群:950875342
2. 平台上所有素材资源,需注册登录会员方能正常下载。
3. 会员用户积极反馈网站、素材资源BUG或错误问题,每次奖励2K币
4. PHP源码类素材,如需协助安装调试,或你有二次开发需求,可联系苦力吧客服。
5. 付费素材资源,需充值后方能下载,如有任何疑问可直接联系苦力吧客服
相关资源 / 表单美化

jquery支持多选功能的select下拉菜单插件

Kealselect插件将常规HTML选择转换为交互式高级下拉列表,支持全选、多选和自定义CSS样式。
  表单美化
 8234  0

IOS风格的radio单选开关按钮切换特效代码

一款radio按钮美化插件,类似于苹果手机系统的左右开关按钮,非常人性化设计,按tab键,然后按enter键以测试可访问性。
  表单美化
 1214  0

jquery将select转换为IOS风格的单选多选表单美化代码

一款轻量级select表单美化插件,支持三种模式: 单选(不可取消选择)、单选(可取消选择)多选(可取消选择)。
  表单美化
 5236  0

jquery下拉框select表单美化插件

一款蓝色风格下拉菜单美化代码,代码简单实用。
  表单美化
 3228  0

评论数(0) 回复有机会获得K币 用户协议

^_^ 还没有人评论,快来抢个沙发!
😀
  • 😀
  • 😊
  • 😂
  • 😍
  • 😑
  • 😷
  • 😵
  • 😛
  • 😣
  • 😱
  • 😋
  • 😎
  • 😵
  • 😕
  • 😶
  • 😚
  • 😜
  • 😭
发表评论