Helper functions

Ask a question
Function Description Available since Example
contextPath

The AJS.contextPath() function returns the "path" to the application, which is needed when creating absolute urls within the application.

3.5.5
dim

Blanket management.

5.4.0
undim

Blanket management.

5.4.0
format

Provides an easy way to substitute parameters into a string.

5.4.0
I18n

I18n keys.

5.4.0
messages

Messages creation.

5.4.0
navigation

Used for manipulating navigation. Used in the header, and in the sidebar such as expanding and collapsing.

5.6.0
params

Takes meta tags from the page and populates an object with them.

5.4.0
populateParameters

Takes meta tags from the page and populates an object with them.

5.4.0
whenIType

Keyboard shortcuts library.

5.4.0
version

Returns the version of AUI.

5.4.0
$

jQuery.

5.4.0
banner

Creates a banner for the top of the page.

5.9.0
dialog2

Constructor for dialog 2.

5.4.0
flag

Creates a flag.

5.7.0
formValidation

Utilities for doing form validation.

5.9.0
progressBars

Utility for handling progress indicators.

5.9.0
select

Constructor for aui-select. To move to AJS.element.

5.8.0 https://docs.atlassian.com/aui/latest/docs/single-select.html
sidebar

Constructor for the sidebar element.

5.6.0 https://docs.atlassian.com/aui/latest/docs/sidebar.html
tablessortable

Sortable table utility functions.

5.6.0 https://docs.atlassian.com/aui/latest/docs/sortable-table.html
Cookie Deprecated

Store values in a persistent cookie without worrying about the application using too many cookies.

3.5.5
debounce

Ensure that a constantly firing function doesn't cause performance issues.

Don't use when binding to an infrequently firing event.

5.1
debounceImmediate

Like debounce(), makes sure that a constantly firing function doesn't cause performance issues, but fires at the start rather than at the end of the wait period.

Don't use when binding to an infrequently firing event.

5.9
escapeHTML

The AJS.escapeHtml() performs html-safe escaping of the input string. Specifically, it encodes:

  • <
  • >
  • &
  • '
  • "
4.0
format

Provides an easy way to substitute parameters into a string.

1.0
I18n.getText

AUI includes a web resource transformer that will translate some javascript into the literal strings before being served.

3.5.5
isDirty

Make sure users cannot accidentally lose data.

2.0
log

A safe alternative to console.log(). It ensures that both console and the console.log method exist before executing. This means if you happen to leave one in your code, browsers which don't support console.log (eg. IE, some mobile browsers) shouldn't break.

1.0
version

Detects the version of AUI on the current page.

1.2