Select2
The jQuery replacement for select boxes
Version 4.0.0 beta
---
layout: home
title: Select2 - The jQuery replacement for select boxes
slug: home
---
The jQuery replacement for select boxes
Version 4.0.0 beta
Select2
In order to use Select2, you must include the JavaScript and CSS file on your website. You can get these files built for you from many different locations.
Select2 is hosted on both the cdnjs and jsDelivr CDNs, allowing you to quickly include Select2 on your website.
<head>
section of your HTML.
<link href="//cdnjs.cloudflare.com/ajax/libs/select2/4.0.0/select2.min.css" /> <script src="//cdnjs.cloudflare.com/ajax/libs/select2/4.0.0/select2.min.js"></script>
>select<
element that you
want to make awesome.
<script type="text/javascript"> $('select').select2(); </script>
In some situations, you can't use Select2 from a CDN and you must include the files through your own static file servers.
dist
directory to your project.
<head>
section of your HTML.
<link href="path/to/select2.min.css" /> <script src="path/to/select2.js"></script>