Sets the current focusable depth if the given value is different from current value. If the current focus item exists, it will be blurred. And then, finds a proper next focus item and focuses it. If there was a previously focused item in the new depth, it will be next focus item. Otherwise searches for a initial focus item from the new depth and then uses it to next focus item.
(static) setDepth(depth, groupopt, useHistoryopt) → {jQuery.caph.focus.controllerProvider.controller}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
depth |
number | A number to be set. |
|
group |
string |
<optional> |
A group to be set. If not passed, use the initial focus group of the given depth. If there is no initial focus group, use default group. |
useHistory |
boolean |
<optional> |
A boolean determines whether searches for a focusable element from the focus change history in advance. Default value is true. |
Returns:
Example
function changeDepth(depth) {
$.caph.focus.controllerProvider.getInstance().setDepth(depth);
}