diff --git a/css/guardianstyling.scss b/css/guardianstyling.scss index 0d685b9..f612b2d 100644 --- a/css/guardianstyling.scss +++ b/css/guardianstyling.scss @@ -10,6 +10,7 @@ .tab-content { list-style-type:none; + font-size: 14px; } .gtableline:nth-child(odd) { diff --git a/js/application.js b/js/application.js index 68e3103..2c9db30 100644 --- a/js/application.js +++ b/js/application.js @@ -1,23 +1,19 @@ $( document ).ready(function() { - var fillNews=function(sect){ - $.ajax({ - url: "http://content.guardianapis.com/search?api-key=test&show-fields=all&order-by=newest§ion=" + sect, success: function(data) { - for(var i=0; i<5; i++) { - - var str = '
  • '+'' + - data.response.results[i].webTitle + "" + - data.response.results[i].fields.trailText.substr(0,130)+"..." + '
  • ' - - $( "#" + sect ).append(str); + var str = ''; + for(var i=0; i<5; i++) { + str += '
  • ' + '' + + data.response.results[i].webTitle + "" + + data.response.results[i].fields.trailText.substr(0,130) + "..." + '
  • '; } - } + $( "#" + sect ).append(str); + } }); }; fillNews("football");