-
Notifications
You must be signed in to change notification settings - Fork 0
/
jquery.events.coffee
41 lines (34 loc) · 1.63 KB
/
jquery.events.coffee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
init = (Bacon, $) ->
$.fn.extend
keydownE: (args...) -> @asEventStream "keydown", args...
keyupE: (args...) -> @asEventStream "keyup", args...
keypressE: (args...) -> @asEventStream "keypress", args...
clickE: (args...) -> @asEventStream "click", args...
dblclickE: (args...) -> @asEventStream "dblclick", args...
mousedownE: (args...) -> @asEventStream "mousedown", args...
mouseupE: (args...) -> @asEventStream "mouseup", args...
mouseenterE: (args...) -> @asEventStream "mouseenter", args...
mouseleaveE: (args...) -> @asEventStream "mouseleave", args...
mousemoveE: (args...) -> @asEventStream "mousemove", args...
mouseoutE: (args...) -> @asEventStream "mouseout", args...
mouseoverE: (args...) -> @asEventStream "mouseover", args...
resizeE: (args...) -> @asEventStream "resize", args...
scrollE: (args...) -> @asEventStream "scroll", args...
selectE: (args...) -> @asEventStream "select", args...
changeE: (args...) -> @asEventStream "change", args...
submitE: (args...) -> @asEventStream "submit", args...
blurE: (args...) -> @asEventStream "blur", args...
focusE: (args...) -> @asEventStream "focus", args...
focusinE: (args...) -> @asEventStream "focusin", args...
focusoutE: (args...) -> @asEventStream "focusout", args...
loadE: (args...) -> @asEventStream "load", args...
unloadE: (args...) -> @asEventStream "unload", args...
if module?
Bacon = require("baconjs")
$ = require("jquery")
module.exports = init(Bacon, $)
else
if typeof define == "function" and define.amd
define ["bacon", "jquery"], init
else
init(this.Bacon, this.$)