I am writing a small library that will take care of adding and removing events. I am simply attempting to pass the parameters of a method to jQuery on. Is there any reason that I should not be able to do this?
# within some object
...
on: (el, args...) ->
$(el).on.apply(this, args)
The way I am using this may not be correct, but I don't believe it is the problem.
Which would then be called like so:
SomeObj.on('#hi', 'click'
-> console.log('clicked element')
)
I get the error Uncaught TypeError: elem.each is not a function
For some reason this is totally stumping me.
