JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://yui.yahooapis.com/3.3.0/build/yui/yui-min.js"></script>
<!DOCTYPE html>
<html>
<head></head>
<body>
<div id="loading">Loading...</div>
</body>
</html>
CSS
li {
font-wight: bold;
}
JavaScript
YUI().use('node', 'jsonp', 'substitute', function(Y) {
Y.jsonp('http://www.otago.ac.nz/webservices/apis/weather/json/?query=Dunedin,NZ&callback={callback}', function(response) {
var body = Y.one(Y.config.doc.body),
html = ['<ul>'];
Y.each(response.item, function(v, i) {
html.push(Y.substitute('<li>{title}: {value}</li>', v));
});
html.push('</ul>');
Y.one('#loading').remove(true);
body.append(html.join(''));
});
});