GoConqr has a new look! Let us know what you think.

Module 14 of 15 · Media

JQuery AJAX

Kostas Diakogiannis

JQuery AJAX

Making  JQuery AJAX requests 

JQuery also provides some functions that deal with asynchronous operations and make asynchronous requests (exactly like the fetch api does). Some of the most common ways to perform such requests by using JQuery is: 

$('selector').load(url) => Gets the data from the specified url and loads the response to selector element. Docs here!

$.get(url) => Performs a get request to the server. Requests data from the source. Docs 

$.post(url) => Submits data to the specified resource.

Find more about $get / $post methods here!

$.ajax(url, objectSettings) => Performs any type of request in the specific url. Accepts also an object of parameters as a second argument.  Returns a promise, that can be chained either through the .done() functions (see image above), or as the async /await method.

Official $.ajax method documentation here:

 

 

Instructions

You must submit an attempt for this quiz to progress. You can submit it after the last question.

Go to the chosen module

Feedback

What is it about?

What do you think of the new look?

How do you like it?