I have a function in JS. When I run it on the console I get the expected results
function hello(data) {
$.foo = data;
}
$.ajax({
type: "GET",
url: "http://somesite.com/api?callback=hello&AssetId=123&returnFormat=json",
dataType: "jsonp"
});
now when I convert it to coffee
hello = (data) ->
$.foo = data
return
$.ajax
type: 'GET'
url: 'http://somesite.com/api?callback=hello&AssetId=123&returnFormat=json'
dataType: 'jsonp'
nothing happens
can someone tell me what I am doing wrong here