Duration: 15:36 minutes
Summary:This video discusses the get function. We will use it to retrieve an html page from the server. The parameters we will be passing are the name of the page and the callback function. So when the user clicks a button on the page, the click event is triggered and the get function is called. The data we get back is displayed in a div.
Although the get function is handy to make these types of calls, you will end up using the ajax function if you need more flexibility with the call. Behind the scene get uses ajax. To illustrate this, we will build the same call using the ajax function. The ajax function takes a large set of parameters that ranges from the type, to the url and data (there is a long list of these parameters on the jQuery web site). After making the ajax call, we will call the done function to retrieve the data and display it on the page. Obviously, we will have the same result as the get call.
Technologies and Resources: jQuery, jqGrid, document, ready, callback function, div, click, Ajax function, html, button, $.get, $.ajax.