file-attachment.js

/*http://stackoverflow.com/questions/23336028/how-to-get-attachment-file-content-with-jquery/23467839#23467839*/

by guest271314

HTML

<ol></ol>

JavaScript

$(function() {
$.getJSON("https://query.yahooapis.com/v1/public/yql?q=select"
          +"* from csv where url='http://finviz.com/export.ashx?'"        
          +"&format=json&diagnostics=true&callback=?", function (data, textStatus, jqxhr) {
    $.each(data.query.results.row, function (index, value) {
        jqxhr.promise()
        .done(function () {
                $("<li>", {
                  "text": value.col2 + " " + value.col8
                })
                .css("padding", "8px")
                .appendTo("ol");
        })
        .always(function () {
            if (index === 4999) {
              console.log(data.query
                        , data.query.diagnostics.warning
                        , data.query.results.row.length
                        , index
                        , $("li").length);
            };
        });
    });
});
});