Sha256: 8c556e601f84f14f016c613974101e0e842dbb4e8c37217a9fd0ec9b14345c92
Contents?: true
Size: 695 Bytes
Versions: 5
Compression:
Stored size: 695 Bytes
Contents
<!doctype html> <body> <h1>Latest news</h1> <div id="news"></div> <script type='text/javascript' src='http://code.jquery.com/jquery-1.8.2.min.js'></script> <script type='text/javascript'> $(function () { var url = 'https://blog.howmanyleft.co.uk/api/read/json?callback=?&type=text&num=3&filter=text'; $.getJSON(url, function (data) { $.each(data.posts, function (idx, post) { var title = post['regular-title']; var href = post['url-with-slug']; var body = post['regular-body']; $('#news').append( '<h3><a href="' + href + '">' + title + '</a></h3>' + '<p>' + body + '</p>'); }); }); }) </script> </body>
Version data entries
5 entries across 5 versions & 1 rubygems