Created
April 12, 2015 22:55
-
-
Save internetimagery/9affc3b8a79f537c2be0 to your computer and use it in GitHub Desktop.
Crossdomain json ajax
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
crossDomainLoad: (url, callback)-> | |
$.get "http://query.yahooapis.com/v1/public/yql", { | |
q: "select * from json where url = \"#{url}\"" | |
format: "json" | |
}, (data)-> | |
if data.query.results | |
callback data.query.results.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment