What's the difference between: $(this.el).html and this.$el.html

前端 未结 6 1020
说谎
说谎 2020-12-13 02:26

What\'s the difference between:

$(this.el).html

and

this.$el.html

Reading a few backbone examples and so

6条回答
  •  再見小時候
    2020-12-13 02:31

    They yield exactly the same thing; that is, a reference to a view's element. $el is simply a jquery wrapper for $(this.el). Look at this reference: http://documentcloud.github.com/backbone/#View-$el

提交回复
热议问题