confused about JSONP

confused about JSONP

Hi
If I open the console on any jQuery-enabled page and type:

  1. $('<div/>').load('http://picasaweb.google.com/data/feed/api/user/agota64?alt=json-in-script', function(res){alert(res);})

obviously I get a bunch of JSON delivered cross-domain.
 
As I understand it, this is using the JSONP method for cross-domain requests.

If I understand correctly, this involves jQuery creating a script element and setting it's src attribute to the url concerned, thus overcoming the cross-domain problems of XMLHttpRequest.

I know the above code results in a call to the $.ajax method, but from looking at the jQuery source, as far as I can see the above code does not result in the creation of a script element anywhere, but instead makes the request using XHR. So I'm really confused!

Also, I can't see where this code results in the datatype for the request being set to jsonp -instead of html.

Any explanation appreciated