Javascript dropdown

The jSuites.dropdown can be created from an existing <select></select> element, or via JavaScript as the examples below:


Basic dropdown from a HTML tag

<html>
<script src="https://bossanova.uk/jsuites/v3/jsuites.js"></script>
<link rel="stylesheet" href="https://bossanova.uk/jsuites/v3/jsuites.css" type="text/css" />

<select name="countries" id="countries">
<option value="1">UK</option>
<option value="2">US</option>
<option value="3">Brazil</option>
<option value="4">Canada</option>
</select>

<script>
jSuites.dropdown(document.getElementById('countries'));
</script>
</html>

Basic dropdown via JavaScript

<html>
<script src="https://bossanova.uk/jsuites/v3/jsuites.js"></script>
<link rel="stylesheet" href="https://bossanova.uk/jsuites/v3/jsuites.css" type="text/css" />

<div id="dropdown"></div>

<script>
jSuites.dropdown(document.getElementById('dropdown'), {
    data:[
        'City of London',
        'City of Westminster',
        'Kensington and Chelsea',
        'Hammersmith and Fulham', // (...)
    ],
    width:'280px',
});
</script>
</html>