Subscribe - It's FREE!!

Stay Connected Here

Stay Updated With Us Here



Google

Bootstrap Multiselect - Dropdown with checkbox list with Filter and select all


Share with WhatsApp


This post covers information about how to implement Bootstrap Multiselect jQuery plugin in HTML with different options such as filter and select all functionality.

Many of the application now days requires such kind of multiselect option which provides easy input facility for the user. Let's see how to implement this plugin.

First of all you need a reference files of bootstrap and jQuery included in your application or page then you need to include reference bootstrap-multiselect.js and bootstrap-multiselect.css which you can download from here.

Then suppose you have defined a HTML mark up for select options like below.


<select id="ddlCars" multiple="multiple">
<option value="Accord">Accord</option>
<option value="Duster">Duster</option>
<option value="Esteem">Esteem</option>
<option value="Fiero">Fiero</option>
<option value="Lancer">Lancer</option>
<option value="Phantom">Phantom</option>
</select>

Now you need to call jQuery code like following to convert this normal select to multiselect.

 $('#ddlCars').multiselect();

That's it. Now if you run your site or page you will find an awesome multiselect i.e. dropdown with checkbox list.

This plugin has several inbuilt properties and method to get this control worked in most kind of functionality, out of which below are some frequently needed properties.

numberDisplayed : This property controls after how much items control start displaying "..Selected" Text.

includeSelectAllOption : This flag allows you to provide select all functionality within the control.

enableFiltering : This flag allows you to provide search box to filter items.

nonSelectedText : This property allows you to change the default "None Selected" text when no items selected to any custom text.

Below is the live working fiddle with all above functionalities.

Let me know your opinion about this plugin and do share if you know any other better plugin. Thanks.



If you enjoyed this post take 5 seconds to share it! Be Socialable. :-)

Share with WhatsApp

Posts To Read Next

Typewriter - Automatic TypeScript Template generation from C# classes in Visual Studio

Typewriter, an extension for visual studio that generates TypeScript files from C# code files using TypeScript templates. Convert your C# model classes to TypeScript automatically.


Swagger - Powerful Opensource Framework for RESTful API

With a Swagger-enabled API, you get interactive documentation, client SDK generation and discoverability. Swagger Editor allows you to generate code, documentation with ease.


Visual Studio Code - Lighweight but powerful source code editor available for Windows, OS X and Linux

Visual Studio Code is a lightweight but powerful source code editor which runs on your desktop and is available for Windows, OS X and Linux. It comes with built-in support for JavaScript, TypeScript and Node.js and has a rich ecosystem of extensions for other languages (C++, C#, Python, PHP) and runtimes.


Assembla - Free and private repository to manage your source code online with SVN subversion hosting

With Assembla you can share source code with others online. Free & Private source code repository with SVN Subversion, Git & Perforce Hosting.


How to call click or any event only once in jQuery

Know how to execute an click event or any event only once for any element in jQuery. Perform action only once and even not required to unbind event.


Your opinion is valuable for us! Comments, suggetions are welcome.


Submit your Email Id to stay updated with us and get notified with our new posts. It's FREE!
Vu 32'' TV Vu 24'' TV
We know this popup is disturbing you!
But We would greatly appreciate if you share us with your friends below!

It will not take more than 2 seconds but will motivate us greatly to write more,share more!

x