Create a pull request for your final method presentation file to be submitted to the final repo.
<!DOCTYPE html>
<html>
<head>
<title>AJAX Exercise</title>
</head>
<body>
<h1 id="headline">My Work</h1>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script>
//your code here
</script>
</body>
</html>
...stands for Asynchronous Javascript And XML
The process allows you to exchange data with a server without having the user refresh the page
It sounds fancy, but AJAX is simply a reference to a combination of technologies that allow multiple things to happen at once
The way in which your data is formatted. Your data can be any content you want to organize and display. The most common types in modern web development are XML and JSON.
<work>
<project>
<title>Out, And Serving</title>
<type>photo essay</type>
<url>http://www.nytimes.com/interactive/2014/03/09/opinion/sunday/exposures-military.html</url>
<pubDate>March 9, 2014</pubDate>
</project>
</work>
{
"title":"Out, And Serving",
"type":"photo essay",
"url":"http://www.nytimes.com/interactive/
2014/03/09/opinion/sunday/exposures-military.html",
"pubDate":"March 9, 2014"
}
There are multiple jQuery methods you can use to grab data from a server, including:
$.ajax({
dataType: "json",
url: url,
data: data,
});
There are multiple shorthand methods that are wrappers around the ajax method. Generally, you want to use ajax because it offers more configuration options.
$.getJSON("http://dataurl.com/json.js",
function(data){ });
For security reasons, modern browsers don't allow you to grab data from a server that is located on a different domain.
When you are you using an API you generate a security key that you define in your code, that gives you permission to access data.
Read Chapter 9 in Javascript&JQuery
Extra: SitePoint Tutorial
Do Codecademy's jQuery & AJAX Lesson, parts 1-7. Make sure to upload a screenshot of the last lesson to Slack.