API Properties - qTip2/qTip2 GitHub Wiki

API Properties A full reference of API properties

The API features a helpful amount of properties for use with the API Methods.

id

Stores the value of the passed id option. If no id was passed, this will be an integer.

rendered

A read-only boolean flag which indicates the current render state of the tooltip i.e. show event has been triggered at least once.

destroyed

A read-only boolean flag which indicates the whether or not the destroy method has been called.

elements

An object containing references to elements relating to the tooltip, including the initial target.

api.elements.target; // Reference to the 'target' element i.e. matched by $('.selector').qtip()
api.elements.tooltip; // Container element for those below
api.elements.titlebar; // Titlebar holds the title (and close button, if enabled) element(s) below
api.elements.title; // Contains the [content.title](./Content#title)
api.elements.button; // Close button defined by [content.button](./Content#button)
api.elements.content; // Contains the [content.text](./Content#text)

Plugins also add additional propeties to this object. Please refer to their individual documentation for details.

timers

An object containing all currently running timers related to show and hide delays.

api.timers = {
	show: timerObject, // Value of the setTimeout call for showing the tooltip (if show.delay is set)
	hide: timerObject // Value of the setTimeout call for hiding the tooltip (if hide.delay is set)
}

options

Object containing all options passed upon initialisation, sanitized and merged with the $.fn.qtip.defaults object. Do not use this object to update a qTip's options! Use the api.set() method instead!

cache

Contains several cached properties and flags that qTip uses internally for various purposes. Great place to store custom flags or values when using the API.

⚠️ **GitHub.com Fallback** ⚠️