diff --git a/docs/_includes/navigation.html b/docs/_includes/navigation.html index 6d0f17a2..6ea57563 100644 --- a/docs/_includes/navigation.html +++ b/docs/_includes/navigation.html @@ -15,9 +15,6 @@ Home - - Getting started - Examples diff --git a/docs/index.html b/docs/index.html index 9afd8fb6..f9d8c72f 100644 --- a/docs/index.html +++ b/docs/index.html @@ -27,3 +27,121 @@ slug: home + +
+
+ Select2 gives you a customizable select box with support for searching, + tagging, remote data sets, infinite scrolling, and many other highly used + options. +
+ +
+

+ Getting started with 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. +

+ +

+ Using Select2 from a CDN +

+ +

+ Select2 is hosted on both the + cdnjs and + jsDelivr CDNs, allowing + you to quickly include Select2 on your website. +

+ +
    +
  1. + Include the following lines of code in the <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>
    +
    + +
    + + Immediately following a new release, it takes some time for CDNs to + catch up and get the new versions live on the CDN. +
    +
  2. +
  3. + Initialize Select2 on the >select< element that you + want to make awesome. + +
    +<script type="text/javascript">
    +  $('select').select2();
    +</script>
    +
    +
  4. +
  5. + Check out the examples page to start using + the additional features of Select2. +
  6. +
+ +

+ Downloading the code locally +

+ +

+ In some situations, you can't use Select2 from a CDN and you must include + the files through your own static file servers. +

+ +
    +
  1. + + Download the code + + from GitHub and copy the dist directory to your project. +
  2. +
  3. + Include the following lines of code in the <head> + section of your HTML. + +
    +<link href="path/to/select2.min.css" />
    +<script src="path/to/select2.js"></script>
    +
    +
  4. +
  5. + Check out the examples page to start using + the additional features of Select2. +
  6. +
+
+ +
+

+ About +

+ + +
+