1.0.5 • Published 6 months ago

@types/jquery-sticky v1.0.5

Weekly downloads
232
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/jquery-sticky

Summary

This package contains type definitions for jquery-sticky (https://github.com/garand/sticky).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jquery-sticky.

index.d.ts

// Type definitions for jquery-sticky 1.0
// Project: https://github.com/garand/sticky
// Definitions by: Matthieu Tabuteau <https://github.com/maixiu>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3

/// <reference types="jquery" />

interface JQueryStickyOptions {
    /**
     * Pixels between the page top and the element's top.
     * @default 0
     */
    topSpacing?: number | undefined;

    /**
     * Pixels between the page bottom and the element's bottom.
     * @default 0
     */
    bottomSpacing?: number | undefined;

    /**
     * CSS class added to the element's wrapper when "sticked".
     * @default is-sticky
     */
    className?: string | undefined;

    /**
     * CSS class added to the wrapper.
     * @default 'sticky-wrapper'
     */
    wrapperClassName?: string | undefined;

    /**
     * Boolean determining whether the sticky element should be horizontally centered in the page.
     * @default false
     */
    center?: boolean | undefined;

    /**
     * Selector of element referenced to set fixed width of "sticky" element.
     * @default ''
     */
    getWidthFrom?: string | undefined;

    /**
     * Boolean determining whether width of the "sticky" element should be updated to match the wrapper's width.
     * Wrapper is a placeholder for "sticky" element while it is fixed (out of static elements flow), and its width depends on the context and CSS rules.
     * Works only as long getWidthForm isn't set.
     * @default true
     */
    widthFromWrapper?: boolean | undefined;

    /**
     * Boolean determining whether widths will be recalculated on window resize (using getWidthfrom).
     * @default false
     */
    responsiveWidth?: boolean | undefined;

    /**
     * Controls z-index of the sticked element.
     * @default inherit
     */
    zIndex?: string | undefined;
}

interface JQuery {
    /**
     * Initializer. options is optional.
     */
    sticky(options?: JQueryStickyOptions): JQuery;

    /**
     * Recalculates the element's position.
     */
    sticky(method: 'update'): JQuery;

    /**
     * To unstick an object.
     */
    unstick(): JQuery;
}

Additional Details

  • Last updated: Thu, 08 Jul 2021 16:22:30 GMT
  • Dependencies: @types/jquery
  • Global values: none

Credits

These definitions were written by Matthieu Tabuteau.

1.0.5

6 months ago

1.0.4

7 months ago

1.0.3

8 months ago

1.0.2

3 years ago

1.0.1

4 years ago

1.0.0

6 years ago