bootstrap-select

周下载量 63,214

是bootstrap中select库下载量最多的。

https://www.npmjs.com/package/bootstrap-select

The jQuery plugin that brings select elements into the 21st century with intuitive multiselection, searching, and much more. Now with Bootstrap 4 support.

https://github.com/snapappointments/bootstrap-select

Bootstrap-select requires jQuery v1.9.1+, Bootstrap’s dropdown.js component, and Bootstrap's CSS. If you're not already using Bootstrap in your project, a precompiled version of the Bootstrap v3.4.1 minimum requirements can be downloaded here. If using bootstrap-select with Bootstrap v4+, you'll also need Popper.js. For all of Bootstrap v4's requirements, see Getting started. A precompiled version of the requirements will be made available in an upcoming release of bootstrap-select.

Usage

Via selectpicker class

Add the selectpicker class to your select elements to auto-initialize bootstrap-select.

  1. <select class="selectpicker">
  2. <option>Mustard</option>
  3. <option>Ketchup</option>
  4. <option>Barbecue</option>
  5. </select>

Via JavaScript

  1. // To style only selects with the my-select class
  2. $('.my-select').selectpicker();

or

  1. // To style all selects
  2. $('select').selectpicker();

If calling bootstrap-select via JavaScript, you will need to wrap your code in a .ready() block or place it at the bottom of the page (after the last instance of bootstrap-select).

  1. $(function () {
  2. $('select').selectpicker();
  3. });

Check out the documentation for further information.

DEMO

bootstrap-select的更多相关文章

  1. Bootstrap-风格的下拉按框:Bootstrap Select

    Bootstrap Select 是一个jQuery插件,提供了Bootstrap 风格的下拉选择框.拥有许多自定义的选项,可多选. 效果图: 源代码: <select class=" ...

  2. jq bootstrap select 点击不能动弹

    jq  bootstrap select 点击不能动弹   因为是样式selectpicker  冲突. 解决办法换 样式  form-control <select name="ty ...

  3. bootstrap select 多选的用法,取值和赋值(取消默认选择第一个的对勾)

    h5自带的select标签可以实现按住ctrl键多选的功能,但是样式及其难看. bootstrap select是很好用的前端插件 ​ 首先引入bootstrap和bootstrap-select的c ...

  4. bootstrap select 学习使用笔记-------选中赋值及change监听丢失

    在 bootstrap 和 knockout 共同存在下使用 select 下拉选择插件,发现绑定选项.赋值之后插件不可用了,绑定的监听事件也丢失了.迫不得已在绑定选项值之后再次调用刷新,以及赋值后重 ...

  5. Bootstrap select(选择列表)

    当您想让用户从多个选项中进行选择,但是默认情况下只能选择一个选项,则使用选择框 1.使用<select>展示列表选项 2.使用multiple="multiple"允许 ...

  6. Bootstrap select 多选并获取选中的值

    代码: <!DOCTYPE html><html> <head>    <meta charset="UTF-8">    < ...

  7. Bootstrap select多选下拉框实现代码

    前言 项目中要实现多选,就想到用插件,选择了bootstrap-select. 附上官网api链接,http://silviomoreto.github.io/bootstrap-select/. 没 ...

  8. bootstrap select多选

    1.页面效果 <div class="form-group"> <div class="col-md-2 control-label"> ...

  9. bootstrap select下拉框模糊搜索和动态绑定数据解决方法

    此方法适合后台一次性返回所有数据好了废话不多说直接上代码: <!DOCTYPE html><html><head> <title>Bootstrap-s ...

  10. 黄聪: 50 个 Bootstrap 插件

    Bootstrap是快速开发Web应用程序的前端工具包.它是一个CSS和HTML的集合,它使用了最新的浏览器技术,给你的Web开发提供了时尚的版式,表单,buttons,表格,网格系统等等. 本文向你 ...

随机推荐

  1. flutter 从创建到渲染的大体流程

    从创建到渲染的大体流程是:根据Widget生成Element,然后创建相应的RenderObject并关联到Element.renderObject属性上,最后再通过RenderObject来完成布局 ...

  2. datagrid 溢出文本显示省略号 转载

    http://www.jeasyuicn.com/?sort=3 .datagrid-cell, .datagrid-cell-group, .datagrid-header-rownumber, . ...

  3. 音视频RTP数据包封装

    对于语音通信而言,语音码率较低,添加适当冗余是对抗网络丢包的常见方式.冗余方式有多种,包括RED,FEC等都是冗余的一种,如果冗余份数较多,可以采取交织的方式实现.RFC 3350是RTP的基础标准协 ...

  4. 30、Python程序中的线程操作(oncurrent模块)

    进程是cpu资源分配的最小单元,一个进程中可以有多个线程. 线程是cpu计算的最小单元. 对于Python来说他的进程和线程和其他语言有差异,是有GIL锁. GIL锁 GIL锁保证一个进程中同一时刻只 ...

  5. UFUN函数 UF_ATTR函数(UF_ATTR_read_value 函数用法)

    //此函数的功能是输入tag值,返回与属性标题对应的属性值 static string read_attr(tag_t object_tag) { UF_initialize(); ]="零 ...

  6. Numpy | 10 广播(Broadcast)

    广播(Broadcast)是 numpy 对不同形状(shape)的数组进行数值计算的方式, 对数组的算术运算通常在相应的元素上进行. 下面的图片展示了数组 b 如何通过广播来与数组 a 兼容. 4x ...

  7. 一起学Makefile(三)

    makefile工具箱 complicated项目的构建 文件结构如下: 文件内容如下: 项目依赖关系: gcc编译出可执行文件的过程包含了两个过程,编译和链接. makefile如下: 运行结果:

  8. Linux 查看文件权限命令ls -l 输出信息每列所代表的含义

  9. 模拟26A 题解

    A. marshland 考试时想到了网络流,然而不会建图,就死了. 正解是最大费用可行流. 比较容易想到的是将每个点拆为两个点, s连没有危险值的入点, 没有危险值的入点连有危险值的入点,入点出点之 ...

  10. 这个中秋,我用 Java 画了一个月饼!

    栈长代表微信公众号 "Java技术栈" 祝所有粉丝中秋佳节快乐! 为了用一种特殊的方式表达我的心意,去年中秋节,我写了这篇文章: 为了写中秋这篇文章,我学了 20 种编程语言! 没 ...