JHtmlBehavior
class JHtmlBehavior
Utility class for JavaScript behaviors
Methods
Method to load the MooTools framework into the document head
Method to load core.js into the document head.
Add unobtrusive JavaScript support for image captions.
Add unobtrusive JavaScript support for form validation.
Add unobtrusive JavaScript support for form validation.
Add unobtrusive JavaScript support for submenu switcher support
Add unobtrusive JavaScript support for a combobox effect.
Add unobtrusive JavaScript support for a hover tooltips.
Add unobtrusive JavaScript support for modal links.
JavaScript behavior to allow shift select in grids
Add unobtrusive javascript support for a collapsible tree.
Add unobtrusive JavaScript support for a calendar control.
Add unobtrusive JavaScript support for a color picker.
Add unobtrusive JavaScript support for a simple color picker.
Keep session alive, for example, while editing or creating an article.
Highlight some words via Javascript.
Break us out of any containing iframes
Add unobtrusive JavaScript support to keep a tab state.
Add javascript polyfills.
Details
static
void
framework(
boolean $extras = false,
mixed $debug = null)
Method to load the MooTools framework into the document head
If debugging mode is on an uncompressed version of MooTools is included for easier debugging.
static
void
core()
Method to load core.js into the document head.
Core.js defines the 'Joomla' namespace and contains functions which are used across extensions
static
void
caption(
string $selector = 'img.caption')
Add unobtrusive JavaScript support for image captions.
static
void
formvalidation()
Add unobtrusive JavaScript support for form validation.
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.
static
void
formvalidator()
Add unobtrusive JavaScript support for form validation.
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.
static
void
combobox()
Add unobtrusive JavaScript support for a combobox effect.
Note that this control is only reliable in absolutely positioned elements. Avoid using a combobox in a slider or dynamic pane.
static
void
tooltip(
string $selector = '.hasTip',
array $params = array())
Add unobtrusive JavaScript support for a hover tooltips.
Add a title attribute to any element in the form title="title::text"
Uses the core Tips class in MooTools.
static
void
modal(
string $selector = 'a.modal',
array $params = array())
Add unobtrusive JavaScript support for modal links.
static
void
multiselect(
string $id = 'adminForm')
JavaScript behavior to allow shift select in grids
static
void
tree(
string $id,
array $params = array(),
array $root = array())
Add unobtrusive javascript support for a collapsible tree.
static
void
highlighter(
array $terms,
string $start = 'highlighter-start',
string $end = 'highlighter-end',
string $className = 'highlight',
string $tag = 'span')
Highlight some words via Javascript.
static
void
tabstate()
Add unobtrusive JavaScript support to keep a tab state.
Note that keeping tab state only works for inner tabs if in accordance with the following example:
parent tab = permissions
child tab = permission-<identifier>
Each tab header <a>
tag also should have a unique href attribute