Namespace jQueryModule: jquery.sap.global


Provides base functionality of the SAP jQuery plugin as extension of the jQuery framework.
See also jQuery for details.
Although these functions appear as static ones, they are meant to be used on jQuery instances.
If not stated differently, the functions follow the fluent interface paradigm and return the jQuery instance for chaining of statements.

Example for usage of an instance method:

  var oRect = jQuery("#myDiv").rect();
  alert("Top Position: " + oRect.top);

Namespaces & Classes
EventCheck the jQuery.Event class documentation available under "http://www.jquery.com"
and "http://api.jquery.com/category/events/event-object/" for details.
osHolds information about the current operating system
sapRoot Namespace for the jQuery plug-in provided by SAP SE.
supportHolds information about the browser's capabilities and quirks.
Method Summary
addAriaDescribedBy(sID)Adds the given ID reference to the aria-describedby attribute.
addAriaLabelledBy(sID)Adds the given ID reference to the the aria-labelledby attribute.
control(idx?)Extension function to the jQuery.fn which identifies SAPUI5 controls in the given jQuery context.
cursorPos(iPos)Sets or gets the position of the cursor in an element that supports cursor positioning
disableSelection()Disable HTML elements selection.
enableSelection()Enable HTML elements to get selected.
firstFocusableDomRef()Returns the first focusable domRef in a given container (the first element of the collection)
getSelectedText()Retrieve the selected text in the first element of the collection.
hasTabIndex()Returns true if the first element has a set tabindex
lastFocusableDomRef()Returns the last focusable domRef in a given container
outerHTML()Returns the outer HTML of the given HTML element
parentByAttribute(sAttribute, sValue)Gets the next parent DOM element with a given attribute and attribute value starting above the first given element
rect()Returns a rectangle describing the current visual positioning of the first DOM object in the collection (or null if no element was given)
rectContains(iPosX, iPosY)Returns whether a point described by X and Y is inside this Rectangle's boundaries
removeAriaDescribedBy(sID)Removes the given ID reference from the aria-describedby attribute.
removeAriaLabelledBy(sID)Removes the given ID reference from the aria-labelledby attribute.
root(oRootControl)
scrollLeftRTL(iPos)Sets or returns the scrollLeft value of the first element in the given jQuery collection in right-to-left mode.
scrollRightRTL()Returns the MIRRORED scrollLeft value of the first element in the given jQuery collection in right-to-left mode.
selectText(iStart, iEnd)Sets the text selection in the first element of the collection.
uiarea(iIdx)
Method Detail
addAriaDescribedBy(sID): jQueryModule: jquery.sap.dom
Adds the given ID reference to the aria-describedby attribute.
Parameters:
{string}sID The ID reference of an element
Since:
1.30.0
Returns:
{jQuery}this to allow method chaining.
addAriaLabelledBy(sID): jQueryModule: jquery.sap.dom
Adds the given ID reference to the the aria-labelledby attribute.
Parameters:
{string}sID The ID reference of an element
Since:
1.30.0
Returns:
{jQuery}this to allow method chaining.
Extension function to the jQuery.fn which identifies SAPUI5 controls in the given jQuery context.
Parameters:
{int}idx? optional parameter to return the control instance at the given idx's position in the array.
Returns:
{sap.ui.core.Control[]|sap.ui.core.Control|null} depending on the given context and idx parameter an array of controls, an instance or null.
cursorPos(iPos): int|jQueryModule: jquery.sap.dom
Sets or gets the position of the cursor in an element that supports cursor positioning
Parameters:
{int}iPos The cursor position to set (or no parameter to retrieve the cursor position)
Since:
0.9.0
Returns:
{int|jQuery} The cursor position (or the jQuery collection if the position has been set)
disableSelection(): jQueryModule: jquery.sap.dom
Disable HTML elements selection.
Since:
1.24.0
Returns:
{jQuery}this to allow method chaining.
enableSelection(): jQueryModule: jquery.sap.dom
Enable HTML elements to get selected.
Since:
1.24.0
Returns:
{jQuery}this to allow method chaining.
firstFocusableDomRef(): ElementModule: jquery.sap.dom
Returns the first focusable domRef in a given container (the first element of the collection)
Since:
0.9.0
Returns:
{Element} The domRef
getSelectedText(): stringModule: jquery.sap.dom
Retrieve the selected text in the first element of the collection. note: This feature is only supported for input element’s type of text, search, url, tel and password.
Since:
1.26.0
Returns:
{string} The selected text.
hasTabIndex(): booleanModule: jquery.sap.dom
Returns true if the first element has a set tabindex
Since:
0.9.0
Returns:
{boolean} If the first element has a set tabindex
lastFocusableDomRef(): ElementModule: jquery.sap.dom
Returns the last focusable domRef in a given container
Since:
0.9.0
Returns:
{Element} The last domRef
outerHTML(): stringModule: jquery.sap.dom
Returns the outer HTML of the given HTML element
Since:
0.9.0
Returns:
{string} outer HTML
parentByAttribute(sAttribute, sValue): ElementModule: jquery.sap.dom
Gets the next parent DOM element with a given attribute and attribute value starting above the first given element
Parameters:
{string}sAttribute Name of the attribute
{string}sValue Value of the attribute (optional)
Since:
0.9.0
Returns:
{Element} null or the DOM reference
rect(): objectModule: jquery.sap.dom
Returns a rectangle describing the current visual positioning of the first DOM object in the collection (or null if no element was given)
Since:
0.9.0
Returns:
{object} An object with left, top, width and height
rectContains(iPosX, iPosY): booleanModule: jquery.sap.dom
Returns whether a point described by X and Y is inside this Rectangle's boundaries
Parameters:
{int}iPosX
{int}iPosY
Since:
0.18.0
Returns:
{boolean} Whether X and Y are inside this Rectangle's boundaries
removeAriaDescribedBy(sID): jQueryModule: jquery.sap.dom
Removes the given ID reference from the aria-describedby attribute.
Parameters:
{string}sID The ID reference of an element
Since:
1.30.0
Returns:
{jQuery}this to allow method chaining.
removeAriaLabelledBy(sID): jQueryModule: jquery.sap.dom
Removes the given ID reference from the aria-labelledby attribute.
Parameters:
{string}sID The ID reference of an element
Since:
1.30.0
Returns:
{jQuery}this to allow method chaining.
root(oRootControl)Module: jquery.sap.ui
Parameters:
{object}oRootControl
scrollLeftRTL(iPos): jQuery|intModule: jquery.sap.dom
Sets or returns the scrollLeft value of the first element in the given jQuery collection in right-to-left mode. Precondition: The element is rendered in RTL mode.

Reason for this method is that the major browsers use three different values for the same scroll position when in RTL mode. This method hides those differences and returns/applies the same value that would be returned in LTR mode: The distance in px how far the given container is scrolled away from the leftmost scroll position.

Returns "undefined" if no element and no iPos is given.

Parameters:
{int}iPos
Since:
0.20.0
Returns:
{jQuery|int} The jQuery collection if iPos is given, otherwise the scroll position, counted from the leftmost position
scrollRightRTL(): intModule: jquery.sap.dom
Returns the MIRRORED scrollLeft value of the first element in the given jQuery collection in right-to-left mode. Precondition: The element is rendered in RTL mode.

Reason for this method is that the major browsers return three different values for the same scroll position when in RTL mode. This method hides those differences and returns the value that would be returned in LTR mode if the UI would be mirrored horizontally: The distance in px how far the given container is scrolled away from the rightmost scroll position.

Returns "undefined" if no element is given.

Since:
0.20.0
Returns:
{int} The scroll position, counted from the rightmost position
selectText(iStart, iEnd): jQueryModule: jquery.sap.dom
Sets the text selection in the first element of the collection. note: This feature is only supported for input element’s type of text, search, url, tel and password.
Parameters:
{int}iStart Start position of the selection (inclusive)
{int}iEnd End position of the selection (exclusive)
Since:
0.9.0
Returns:
{jQuery} The jQuery collection
uiarea(iIdx)Module: jquery.sap.ui
Parameters:
{int}iIdx