diff --git a/SUBMISSION.md b/SUBMISSION.md index 9f4df99..da3e186 100644 --- a/SUBMISSION.md +++ b/SUBMISSION.md @@ -2,7 +2,7 @@ Use this md to tell us the bugs you solved and also explain the approach you had while solving them. Make them bulleted like -1. Accessibility - **Something here** -2. Aesthetics - **Something here** -3. Testing - **Something here** -4. Technicality Improvements - **Something here** +1. Accessibility - No Improvement +2. Aesthetics - No Improvement +3. Testing - No Improvement +4. Technicality Improvements - Makes Feeds Dynamic using api. Chages the app.js fetch Feed Section and added 10 feeds in feed class diff --git a/app.js b/app.js index 9e583f7..3952bfd 100644 --- a/app.js +++ b/app.js @@ -28,14 +28,18 @@ function loadFeed(id, cb) { rss_url: 'http://feeds.feedburner.com/CssTricks' }, success: function (result, status) { - if (cb) { - cb( /*something*/ ); + if(status == "success"){ + var feedData = result.items; + $.each(feedData,function(index,feedData){ + $('.feed').append('

' + feedData.title +'

'+ feedData.author +'

'); + }); } }, error: function (result, status, err) { //run only the callback without attempting to parse result due to error - if (cb) { - cb(); + if (status) { + console.log(err); + $('.feed').append('
Something Went Wrong
'); } }, dataType: "json" @@ -55,7 +59,7 @@ $(function () { feedList.on('click', function () { var item = $(this); - $('body').addClass( /*A class here*/ ); + $('body').addClass('.feed'); loadFeed(item.data('id')); return false; }); diff --git a/index.html b/index.html index 9e9fa63..421c0cd 100644 --- a/index.html +++ b/index.html @@ -25,77 +25,7 @@

Feed
    - +