Backbone.js view event targets
Functions you associate with events in Backbone.js Views are passed the event as the first parameter, meaning you can determine which element in the view raised the event by (assuming you make 'ev' the first param):
var el = ev.currentTarget;
Or you can wrap a $(ev.currentTarget)
instead to create the jQuery element.
Written by Nathan
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Backbone.js
Authors
Related Tags
#backbone.js
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#