JSFiddle - React, Tailwind, and code Playground

HTML

<div id="foo"></div>

JavaScript

var url =  "https://www.reddit.com/r/funny/.json?limit=4";

$.ajax({
  type: 'GET',
  url: url,
  dataType: 'jsonp',
  success: function(data) { $('#foo').append('<p>Success</p>'); console.log('Success!',data); },
  error: function() { $('#foo').append('<p>Failure!</p>'); console.log('Failure!'); },
  jsonp: 'jsonp'
});