UNPKG

apex4x

Version:

The Comprehensive ARIA Development Suite

26 lines 1.9 kB
�� Function: moveTo(domElementOrCSSSelector, objectConfig, functionOverride) Description: Moves focus to the specified element using a smooth scroll animation. Returns: domElement, or $A object if chained. Requires module: "SmoothScroll" Note: The objectConfig parameter can be used to change the default options for the Velocity animation effect. The functionOverride parameter can be used to change the default focus movement statement to perform a different action instead. If a functionOverride is specified, a similare $A.focus(target) statement must be included within the animation callback to ensure accessibility for keyboard users. Example: $A.import("SmoothScroll", { defer: true }, function() { // Move to a target element. $A.moveTo(domElement); // Move to a target element and change the animation configuration options. $A.moveTo(domElement, { duration: 750, easing: "ease-in" }); });