-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Porfolio Project 2 V1 #7
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,20 @@ $(document).ready(function() { | |
}); | ||
|
||
function handleResponse(response) { | ||
console.log(response); | ||
for (var i=0; i<response.data.length; i++) { | ||
var url= response.data[i].images.standard_resolution.url; | ||
var caption=response.data[i].caption.text; | ||
// console.log(url); | ||
$("#list").append("<img src=" + url + "/>"); | ||
$("#list").append("<div>" + caption + "</div>"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For stage 4 adding an id to caption will make it easier to display the positivity ranking |
||
|
||
} | ||
// console.log(response); | ||
// add stuff here! | ||
} | ||
} | ||
|
||
|
||
// for (var i=0; i<response.response.docs.length; i++) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since you already wrote the correct function, you don't need these anymore. |
||
// $("#list").append("<div>"+response.response.docs[i].headline.main+"</div>"); | ||
// console.log(response.response.docs[i].headline.main) | ||
// } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Your function is really concise! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Link your stylesheet so you can customize the page
<link rel="stylesheet" href="style.css"
>