Closed jonathan-s closed 9 years ago
Looking at the following code. According to the recipe on Callback bindings next should be executed. However it is not.
class MyClass: constructor: () => @showCarouselInfo() @next() next: () => console.log 'fires' showCarouselInfo: => getIndex = (string) => number = parseInt(string.match(/\d+/)) $('.ball').on 'click', (e) => console.log('fire') index = getIndex(e.currentTarget.id) info = $('.carousel-wrapper > p') @next(info[index])
Check your indentations, Looks like coffescript could be compiling it wrong if that's the actual code and not a copy/paste mishap on the white spacing.
Looking at the following code. According to the recipe on Callback bindings next should be executed. However it is not.