Jquery Review

748

1. AJAX: JSON, JSONP with Jquery

JSON, generally speaking, is the most popular way of transmitting data in between services. It just stands for JavaScript Object Notation and it’s very readable, even more readable than XML. And it’s very simple and small, so it’s become very popular, pretty much superseding XML as the most popular way to transmit data around. Plain JSON is used for transmitting data that originates in your own application to other parts of the same application.

And then JSONP which stands for JSON with padding, is a kind of clever hack that’s used to transmit data from a remote service into your application. We’ll look at examples of how to use JSONP in this chapter. And so the reason we like this, is that it’s a format that allows you to tie in to other services to request all kinds of data. We’re going to be looking at the Sunlight Foundation first. They have a huge set of data on things like legislation, who your representatives are, the boundary lines of the congressional district you live in, all kinds of useful stuff.

var requestUrl = “”;

$.getJSON(requestUrl,{}, function(data){

    $.each(){}

});

2. Create a Rotating Carousel with jQuery

PTS export graphics –> Building the HTML and CSS for the outer container