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.

<select class="selectpicker">
<option>Mustard</option>
<option>Ketchup</option>
<option>Barbecue</option>
</select>

Via JavaScript

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

or

// To style all selects
$('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).

$(function () {
$('select').selectpicker();
});

Check out the documentation for further information.

DEMO

最新文章

  1. 我的第一个WebAPI程序
  2. 长文丨papi、咪蒙、罗胖之后,内容创业的机会在哪儿
  3. PHP代码20个实用技巧(转)
  4. html嵌套表格示例
  5. 行高不设单位的好处 line-height:1.8
  6. ios开发逆向传值的几种方法整理
  7. php必看六本书
  8. C# Best Practices - Accessing and Using Classes
  9. 非常简单的oracle和mysql数据互传
  10. java protected修饰符理解
  11. mysql 创建函数This function has none of DETERMINISTIC, NO SQL, or READS
  12. 【立体几何】分类讨论很细节 Gym - 101967I Путешествие по тору
  13. Linux常用命令——文件搜索命令
  14. ASP HUOSHAN VIDEO
  15. S3C2440的七种模式之——未定义模式(去掉bl print1 bug解决)
  16. 【转一篇出处不明的文章】 Windows多线程通信方式
  17. JAVA线程本地变量ThreadLocal和私有变量的区别
  18. Redis源码阅读(四)集群-请求分配
  19. 1、简单的BackGroundWorker多线程时时刷新UI界面,并显示进度
  20. bootstrop-datatime参数配置

热门文章

  1. java 的任意进制间转换(很方便)
  2. mysql查询语句中使用星号真的慢的要死?
  3. Example-based Machine Learning是什么?
  4. HDU2883 kebab(最大流判断满流 + 离散化 + 区间化点)
  5. Linux 系统结构,nglinx
  6. How do I fix &quot;selector not recognized&quot; runtime exceptions when trying to use category methods from a static library?
  7. swift的柯里化demo
  8. final和static语句
  9. benchmarkdotnet dotnet 基准测试类库试用(一)
  10. YY天气使用