Created
June 25, 2012 14:42
-
-
Save hanigamal/2989063 to your computer and use it in GitHub Desktop.
JSONP Snipp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Since you use JSONP, you should code it like this IMHO : | |
$.ajax(URL, { | |
crossDomain:true, | |
dataType: "jsonp", | |
success:function(data,text,xhqr){ | |
$.each(data, function(i, item) { | |
alert(item); | |
}); | |
} | |
}); | |
The correct parameter is callback but jQuery generates one automagically so dont specify it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment