backbone.js - In Backbone views, which is better: this.$el.find('.selector') or this.$('.selector')? -
both of these work, , ff console shows selecting same element, there advantage of using 1 on other?
from fine manual:
$ (jquery)
view.$(selector)[...] it's equivalent running:
view.$el.find(selector)
so this.$(selector) short hand this.$el.find('.selector'). use whichever 1 prefer, there's no functional difference between them.
Comments
Post a Comment