jQuery Plugin To Create Material Style Select Boxes - Selecty

jQuery Plugin To Create Material Style Select Boxes - Selecty
File Size: Unknown
Views Total: 3737
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

The Selecty library lets you create nice-looking, material design inspired select dropdown box in jQuery or vanilla JavaScript.

How to use it:

1. Load the Selecty's JavaScript and CSS files in the html page.

<link rel="stylesheet" href="selecty.css">
<script src="selecty.js"></script>

2. Load the jQuery library if you want to implement the Selecty library as a jQuery plugin.

<script src="//code.jquery.com/jquery-3.1.0.slim.min.js"></script>

3. Call the function selecty() on the select element and done.

$('select').selecty();

4. The pure JavaScript implementation.

var demo = new selecty('#select');

5. Specify the separator used for multi select.

$('#select').selecty({
  separator: ','
});

6. Get the selected value(s).

// jQuery
$('#getValue-button').click(function(event) {
  alert($('#select').val());
});

// pure javascript
var demo = new selecty('#select');
document.getElementById('getValue-button').onclick = function() {
  alert(demo.value);
}

This awesome jQuery plugin is developed by undead25. For more Advanced Usages, please check the demo page or visit the official website.