this.el, the HTML element that this instance of the object was initialized for. A jQuery element. See this.options and this.el.
this.options, an object containing any options that were passed to the module via
data-module-*attributes in the template. See this.options and this.el.
this.$('a')will return all of the
<a>elements inside the module’s HTML element, not all of the
<a>elements on the entire page.
This is a shortcut for
jQuery provides many useful features in an easy-to-use API, including document traversal and manipulation, event handling, and animation. See jQuery’s own docs for details.
this.sandbox, an object containing useful functions for all modules to use, including:
this.sandbox.client, an API client for calling the API
this.sandbox.jQuery, a jQuery find function that is not bound to the module’s HTML element.
this.sandbox.jQuery('a')will return all the
<a>elements on the entire page. Using
this.sandbox.jQueryis discouraged, try to stick to
A collection of jQuery plugins.
Pubsub functions that modules can use to communicate with each other, if they really need to.
window(for example if a vendor plugin that the module uses needs it).
this.ngettextfor string internationalization. See Internationalization.
this.remove(), a method that tears down the module and removes it from the page (this usually called by CKAN, not by the module itself).