Products

A new version of the jSuites JavaScript Dropdown plugin is available here.

JavaScript Dropdown

Javascript dropdown

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

Basic dropdown from a HTML tag

<html>
<script src="https://jsuites.net/v4/jsuites.js"></script>
<link rel="stylesheet" href="https://jsuites.net/v4/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://jsuites.net/v4/jsuites.js"></script>
<link rel="stylesheet" href="https://jsuites.net/v4/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>