When I do something simple like this:
$ ->
$('#target').html('blabla')
it works.
When i try:
$ ->
$('#target').html('blabla').myFunction()
myFunction = ->
// a certain action
I always get an error: TypeError: $(...).html(...).myFunction is not a function.
Why is that?
As you might guess, I´m far from pro!
It’s not a CoffeeScript problem. You’re not defining a jQuery plugin that can be called on a jQuery object, but just a regular function. Have a look here: http://docs.jquery.com/Plugins/Authoring