Skip to content

Internal

Ciprian Popescu edited this page Mar 30, 2021 · 1 revision

Internal Variables & Methods

WiP

Variables

e

The source select field.

__

Contains the locale / language strings.

id

A unique tail.select instance id.

con

The configuration array for this instance.

events

This object contains all custom events, which has been hooked with .on().

options

This object contains the main and used tailOptions prototype instance (the main object is available under tail.select.options).

select

The main tail.select container.

label

The main tail.select label element.

dropdown

The main tail.select dropdown container.

search

The main tail.select search input field.

container

The additional tail.select container, which has been passed through the option multiContainer.

csvInput

The additional tail.select hidden input field, which has been enabled with the option csvOutput.

Methods

.init()

This internal function initializes the tail.select instance, which means that this method does:

  • Validating / Preparing some options
  • Building / Creating the main Elements
  • Preparing the main tailOptions instance
  • Append anything back to the document
  • Call some related functions and callbacks

.bind()

This internal method binds related and important events to the document and should only could ONCE per element / instance.

.callback()

This internal method is the "responser" of the tailOptions instance. When something gets changed on the option, this function gets fired!

.trigger()

This internal helper method just allows to trigger the (internal) events correctly.

.calc()

This internal helper method just calculates the dropdown field (so it's max height) and his position within the viewport.

.cbGroup()

This method is just the "default" callback method for rendering optgroups within the dropdown field, if no cbLoopGroup option callback has been passed to this instance.

.cbItem()

This method is just the "default" callback method for rendering options within the dropdown field, if no cbLoopItem option callback has been passed to this instance.

Clone this wiki locally