Behavior

Utility class for JavaScript behaviors

abstract
since

1.5

Methods

calendartranslation

Internal method to translate the JavaScript Calendar

calendartranslation() : string
static
since

1.5

Response

stringJavaScript that translates the object

combobox

Add unobtrusive JavaScript support for a combobox effect.

combobox() : void
static deprecated

Note that this control is only reliable in absolutely positioned elements. Avoid using a combobox in a slider or dynamic pane.

since

1.5

deprecated

5.0 Use the script directly

core

Method to load core.js into the document head.

core() : void
static deprecated

Core.js defines the 'Joomla' namespace and contains functions which are used across extensions

since

3.3

deprecated

5.0 Use Joomla\CMS\WebAsset\WebAssetManager::enable();

formvalidator

Add unobtrusive JavaScript support for form validation.

formvalidator() : void
static deprecated

To enable form validation the form tag must have class="form-validate". Each field that needs to be validated needs to have class="validate". Additional handlers can be added to the handler for username, password, numeric and email. To use these add class="validate-email" and so on.

since

3.4

deprecated

5.0 Use the script directly

highlighter

Highlight some words via Javascript.

highlighter(array $terms, string $start = 'highlighter-start', string $end = 'highlighter-end', string $className = 'highlight', string $tag = 'span') : void
static deprecated
since

2.5

deprecated

5.0 Use the script directly

Arguments

$terms

arrayArray of words that should be highlighted.

$start

stringID of the element that marks the begin of the section in which words should be highlighted. Note this element will be removed from the DOM.

$end

stringID of the element that end this section. Note this element will be removed from the DOM.

$className

stringClass name of the element highlights are wrapped in.

$tag

stringTag that will be used to wrap the highlighted words.

keepalive

Keep session alive, for example, while editing or creating an article.

keepalive() : void
static deprecated
since

1.5

deprecated

5.0 Use Joomla\CMS\WebAsset\WebAssetManager::enable();

multiselect

JavaScript behavior to allow shift select in grids

multiselect(string $id = 'adminForm') : void
static deprecated
since

1.7

deprecated

5.0 Use the script directly

Arguments

$id

stringThe id of the form for which a multiselect behaviour is to be applied.

polyfill

Add javascript polyfills.

polyfill(string|array $polyfillTypes = null, string $conditionalBrowser = null) : void
static
since

3.7.0

Arguments

$polyfillTypes

string|arrayThe polyfill type(s). Examples: event, array('event', 'classlist').

$conditionalBrowser

stringAn IE conditional expression. Example: lt IE 9 (lower than IE 9).

Properties

loaded

Array containing information for loaded files

static
since

2.5

Type(s)

array