JSFiddle - React, Tailwind, and code Playground
HTML
<div id="results">
</div>
JavaScript
(function($){
// mock stuff
$.fn.sceditor = function(args){
// throw the results in the results div
document.getElementById('results').textContent = JSON.stringify(args);
}
// end mock
// create a variable to store the results
var emoticons = false;
$.getJSON('http://jeremysawesome.com/examples/myJson.php')
.done(function(result){
emoticons = result;
})
.always(function(){
// always initialize the sceditor
$('.my-selector').sceditor({emoticons: emoticons});
});
})(jQuery);