Skip to content

Instantly share code, notes, and snippets.

@internetimagery
Created April 12, 2015 22:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save internetimagery/9affc3b8a79f537c2be0 to your computer and use it in GitHub Desktop.
Save internetimagery/9affc3b8a79f537c2be0 to your computer and use it in GitHub Desktop.
Crossdomain json ajax
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