JSFiddle - React, Tailwind, and code Playground

by Arthur Corenzan

HTML

<script src="https://cdn.rawgit.com/haggen/populous/f47e1b265fb26739219b0e4f6a369169f07b176d/populous.js"></script>
<select>
    <option>Loading...</option>
</select>

JavaScript

var element = $('select');

// Remote data
var data = ['Apple', 'Orange', 'Berry'];

element.populous({
    source: {
        method: 'POST',
        url: '/echo/json/',
        data: {
            json: JSON.stringify(data)
        }
    }
});

// Request remote source...
element.populous('load');

// Change value without waiting
// for it to load the remote
// source... it's magic!
element.val('Orange');