UNPKG

orxapi.tools.toscroll

Version:

The TypeScript toScroll tools library for orxapi

32 lines (31 loc) 941 B
/// <reference types="jquery" /> import { IToScroll, IToScrollUrl } from "./IToScroll"; /** * Scroll to target position * @param target * @param offset * @param duration */ export declare function toScroll({target, offset, duration}: IToScroll): void; /** * Handler for scrolling to target position * @see toScroll * @param evt */ export declare function handleToScroll(evt: JQueryEventObject): void; /** * Scroll to the target form hash into url * @see toScroll * @param hash * @param target * @param offset * @param duration */ export declare function toScrollFromUrl({hash, target, offset, duration}: IToScrollUrl): void; /** * Always return a coordinate object * @param obj The JQuery object * @param functionName Position by default or offset type * @returns {{top: number, left: number}} */ export declare function getPosition(obj: JQuery, functionName?: string): JQueryCoordinates;