Add $.fn.events, which returns a list of all handled events

This commit is contained in:
Nathan Sobo
2012-10-01 12:08:10 -10:00
parent 23e7139ed1
commit 96c9f0bc36
2 changed files with 26 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
$ = require 'jquery'
_ = require 'underscore'
$.fn.scrollBottom = (newValue) ->
if newValue?
@@ -36,3 +37,10 @@ $.fn.trueHeight = ->
$.fn.trueWidth = ->
this[0].getBoundingClientRect().width
$.fn.events = ->
events = _.keys(@data('events') ? {})
if @hasParent()
events.concat(@parent().events())
else
events