I am a CoffeeScript n00b, and I am struggling with calling another function from within my click handler.
The first alert appears, but the second does not.
CourseGuide =
init: ->
$('.js-size-unit-button').on 'click', (e) ->
alert 'hello world - test'
@clickHandler(e)
clickHandler: (e) ->
e.preventDefault()
console.log 'hello world - test 2'
alert 'hello world - test 2'
module.exports = CourseGuide
This is the error in the console:
TypeError: this.clickHandler is not a function
Do I have a basic syntax error?