view.el
  • References/JavaScript/Backbone/View

elview.el All views have a DOM element at all times (the el property), whether they've already been inserted into the page

2025-01-10 15:47:30
View.extend
  • References/JavaScript/Backbone/View

extendBackbone.View.extend(properties, [classProperties]) Get started with views by creating a custom view class. You'll want to

2025-01-10 15:47:30
view.attributes
  • References/JavaScript/Backbone/View

attributesview.attributes A hash of attributes that will be set as HTML DOM element attributes on the view's el (id

2025-01-10 15:47:30
view
  • References/JavaScript/Backbone/View

$ (jQuery)view.$(selector) If jQuery is included on the page, each view has a $ function that runs queries scoped within the

2025-01-10 15:47:30
view.setElement
  • References/JavaScript/Backbone/View

setElementview.setElement(element) If you'd like to apply a Backbone view to a different DOM element, use setElement, which

2025-01-10 15:47:30
view.remove
  • References/JavaScript/Backbone/View

removeview.remove() Removes a view and its el from the DOM, and calls

2025-01-10 15:47:30
View
  • References/JavaScript/Backbone/View

constructor / initializenew View([options]) There are several special options that, if passed, will be attached directly to the view:

2025-01-10 15:47:30
view.render
  • References/JavaScript/Backbone/View

renderview.render() The default implementation of render is a no-op. Override this function with your code that renders the

2025-01-10 15:47:30
view.template
  • References/JavaScript/Backbone/View

templateview.template([data]) While templating for a view isn't a function provided directly by Backbone, it's often a nice convention

2025-01-10 15:47:30
view.undelegateEvents
  • References/JavaScript/Backbone/View

undelegateEventsundelegateEvents() Removes all of the view's delegated events. Useful if you want to disable or remove a view from

2025-01-10 15:47:30