I have this simple coffescript
$(document)
.ready -> $('body') .css -> 'background-color':'black'
it's compile to
(function() {
$(document).ready(function() {
return $('body').css(function() {
return {
'background-color': 'black'
};
});
});
}).call(this);
after that i have some console error no method 'replace', what is wrong? Much thx for help.
$(document).ready ->for jQuery is just$ ->- see api.jquery.com/ready and stackoverflow.com/questions/6004129/document-ready-shorthand