Behavior
Utility class for JavaScript behaviors
since |
1.5 |
---|---|
package |
Joomla CMS |
Methods
calendartranslation
Internal method to translate the JavaScript Calendar
calendartranslation() : string
since |
1.5 |
---|
Response
string
JavaScript that translates the object
combobox
Add unobtrusive JavaScript support for a combobox effect.
combobox() : void
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
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
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
since |
2.5 |
---|---|
deprecated |
5.0 Use the script directly |
Arguments
- terms
array
Array of words that should be highlighted.- start
string
ID 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
string
ID of the element that end this section. Note this element will be removed from the DOM.- className
string
Class name of the element highlights are wrapped in.- tag
string
Tag that will be used to wrap the highlighted words.
keepalive
Keep session alive, for example, while editing or creating an article.
keepalive() : void
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
since |
1.7 |
---|---|
deprecated |
5.0 Use the script directly |
Arguments
- id
string
The 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
since |
3.7.0 |
---|
Arguments
- polyfillTypes
string|array
The polyfill type(s). Examples: event, array('event', 'classlist').- conditionalBrowser
string
An IE conditional expression. Example: lt IE 9 (lower than IE 9).