JSFiddle - React, Tailwind, and code Playground

by philderksen

HTML

<script src="https://raw.github.com/padolsey/jQuery-Plugins/master/cross-domain-ajax/jquery.xdomainajax.js"></script>
<span id="num_downloads"></span> downloads

JavaScript

//References:
//http://jsfiddle.net/skelly/m4QCt/
//https://github.com/padolsey/jQuery-Plugins/tree/master/cross-domain-ajax

$.get("http://wordpress.org/extend/plugins/pinterest-pin-it-button/", function(data) {
    // load the response into jquery element
    // form tags are needed to get the entire html,head and body
    $html = $('<form>' + data.responseText + '</form>');

    //Get count by splitting text elements by space and "popping" last one out
    $pluginData = $.trim($html.find("div.col-3 p:first").text().trim().split(" ").pop());
    $("#num_downloads").text($pluginData);
});