hernansartorio / jquery-nice-select

A lightweight jQuery plugin that replaces native select elements with customizable dropdowns.
http://jqueryniceselect.hernansartorio.com
961 stars 285 forks source link

jQuery Nice Select

A lightweight jQuery plugin that replaces native select elements with customizable dropdowns.

Usage

Include jQuery and the plugin.

<script src="https://github.com/hernansartorio/jquery-nice-select/raw/master/path/to/jquery.js"></script> 
<script src="https://github.com/hernansartorio/jquery-nice-select/raw/master/path/to/jquery.nice-select.js"></script>

Include the plugin styles, either the compiled CSS...

<link rel="stylesheet" href="https://github.com/hernansartorio/jquery-nice-select/blob/master/path/to/nice-select.css">

...or, ideally, import the SASS source (if you use SASS) in your main stylesheet for easier customization.

@import 'nice-select';

Finally, initialize the plugin.

$(document).ready(function() {
  $('select').niceSelect();
});

Full documentation and examples at hernansartorio.com/jquery-nice-select.