According to the official documentation, the variable $el
serves as a cached jQuery (or Zepto) object for the element associated with the view. This provides a convenient way to reference the element without needing to repeatedly wrap it in jQuery or Zepto.
Essentially, $el
is a pre-cached version of the element's jQuery (or Zepto) representation. It eliminates the need to continuously re-wrap the DOM element.
In essence, utilizing $el
allows you to directly apply any jQuery or Zepto methods on the element (el
) without the necessity of wrapping it each time using $()
.