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

jquery带多选功能的input下拉菜单插件

一款单击文本触发自动完成插件,它在获得焦点时将一个具有多选和自动完成功能的下拉列表附加到任何DOM元素(例如输入字段)。
  表单美化
 191  

CSS创建的一个拱形切换开关特效代码

一个switch UI按钮,支持鼠标点击切换打开或关闭。单击时开关外观会发生变化。
  表单美化
 190  

jquery下拉菜单select表单样式美化插件

包含了多种风格样式集合,下拉列表菜单带模糊查询功能,还可自定义带icon图标。
  表单美化
 210  

IOS风格滑动选择的radio单选按钮美化特效代码

这是一款表单单选按钮美化,基于CSS实现了一个滑动单选按钮效果。当鼠标点选开始或关闭时,呈现滑动的动画选择特效,很漂亮。
  表单美化
 152  

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

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