ixfx
    Preparing search index...

    Type Alias WrappedElement

    Wraps an element (or set of elements) with handy functions for manipulation.

    type WrappedElement = {
        cssClass: (value: boolean, cssClass: string) => void;
        cssDisplay: (value: string) => void;
        cssToggle: (cssClass: string) => void;
        el: () => HTMLElement;
        els: () => HTMLElement[];
        html: (value: string | number) => string;
        text: (value: string | number) => string;
    }
    Index

    Properties

    cssClass: (value: boolean, cssClass: string) => void

    Adds/removes a CSS class depending on value

    Type declaration

      • (value: boolean, cssClass: string): void
      • Parameters

        • value: boolean
        • cssClass: string

        Returns void

    cssDisplay: (value: string) => void

    Sets the CSS 'display' property to value

    Type declaration

      • (value: string): void
      • Parameters

        • value: string

        Returns void

    cssToggle: (cssClass: string) => void

    Toggles a CSS class

    Type declaration

      • (cssClass: string): void
      • Parameters

        • cssClass: string

        Returns void

    el: () => HTMLElement

    Gets the HTML element corresponding to original selector. If the selector returns multiple items, the first is yielded

    Type declaration

      • (): HTMLElement
      • Returns HTMLElement

    els: () => HTMLElement[]

    Returns a set of HTML elements that match selector

    Type declaration

      • (): HTMLElement[]
      • Returns HTMLElement[]

    html: (value: string | number) => string

    Sets inner HTML

    Type declaration

      • (value: string | number): string
      • Parameters

        • value: string | number

        Returns string

    text: (value: string | number) => string

    Sets inner text

    Type declaration

      • (value: string | number): string
      • Parameters

        • value: string | number

        Returns string