Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IRootElementService

Hierarchy

  • JQLite
    • IRootElementService

Index

Properties

length

length: number

Methods

addClass

  • Adds the specified class(es) to each of the set of matched elements.

    see

    https://api.jquery.com/addClass/#addClass-className

    Parameters

    • className: string

      One or more space-separated classes to be added to the class attribute of each matched element.

    Returns IRootElementService

after

  • after(content1: string | any[] | Element | JQuery | DocumentFragment | Text, ...content2: any[]): IRootElementService
  • after(func: (index: number, html: string) => string | Element | JQuery): IRootElementService
  • Insert content, specified by the parameter, after each element in the set of matched elements.

    see

    https://api.jquery.com/after/#after-content-content

    Parameters

    • content1: string | any[] | Element | JQuery | DocumentFragment | Text

      HTML string, DOM element, DocumentFragment, array of elements, or jQuery object to insert after each element in the set of matched elements.

    • Rest ...content2: any[]

      One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert after each element in the set of matched elements.

    Returns IRootElementService

  • Insert content, specified by the parameter, after each element in the set of matched elements.

    see

    https://api.jquery.com/after/#after-function

    Parameters

    • func: (index: number, html: string) => string | Element | JQuery

      A function that returns an HTML string, DOM element(s), or jQuery object to insert after each element in the set of matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.

        • (index: number, html: string): string | Element | JQuery
        • Parameters

          • index: number
          • html: string

          Returns string | Element | JQuery

    Returns IRootElementService

append

  • append(content1: string | any[] | Element | JQuery | DocumentFragment | Text, ...content2: any[]): IRootElementService
  • append(func: (index: number, html: string) => string | Element | JQuery): IRootElementService
  • Insert content, specified by the parameter, to the end of each element in the set of matched elements.

    see

    https://api.jquery.com/append/#append-content-content

    Parameters

    • content1: string | any[] | Element | JQuery | DocumentFragment | Text

      DOM element, DocumentFragment, array of elements, HTML string, or jQuery object to insert at the end of each element in the set of matched elements.

    • Rest ...content2: any[]

      One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the end of each element in the set of matched elements.

    Returns IRootElementService

  • Insert content, specified by the parameter, to the end of each element in the set of matched elements.

    see

    https://api.jquery.com/append/#append-function

    Parameters

    • func: (index: number, html: string) => string | Element | JQuery

      A function that returns an HTML string, DOM element(s), or jQuery object to insert at the end of each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set.

        • (index: number, html: string): string | Element | JQuery
        • Parameters

          • index: number
          • html: string

          Returns string | Element | JQuery

    Returns IRootElementService

attr

  • Get the value of an attribute for the first element in the set of matched elements.

    see

    https://api.jquery.com/attr/#attr-attributeName

    Parameters

    • attributeName: string

      The name of the attribute to get.

    Returns string

  • Set one or more attributes for the set of matched elements.

    see

    https://api.jquery.com/attr/#attr-attributeName-value

    Parameters

    • attributeName: string

      The name of the attribute to set.

    • value: string | number

      A value to set for the attribute. If this is null, the attribute will be deleted.

    Returns IRootElementService

  • Set one or more attributes for the set of matched elements.

    see

    https://api.jquery.com/attr/#attr-attributes

    Parameters

    • attributes: Object

      An object of attribute-value pairs to set.

    Returns IRootElementService

bind

  • Attach a handler to an event for the elements.

    see

    https://api.jquery.com/bind/#bind-eventType-eventData-handler

    Parameters

    • eventType: string

      A string containing one or more DOM event types, such as "click" or "submit," or custom event names.

    • handler: (eventObject: JQueryEventObject) => any

      A function to execute each time the event is triggered.

        • (eventObject: JQueryEventObject): any
        • Parameters

          • eventObject: JQueryEventObject

          Returns any

    Returns IRootElementService

  • Attach a handler to an event for the elements.

    see

    https://api.jquery.com/bind/#bind-eventType-eventData-preventBubble

    Parameters

    • eventType: string

      A string containing one or more DOM event types, such as "click" or "submit," or custom event names.

    • preventBubble: boolean

      Setting the third argument to false will attach a function that prevents the default action from occurring and stops the event from bubbling. The default is true.

    Returns IRootElementService

  • Attach a handler to an event for the elements.

    see

    https://api.jquery.com/bind/#bind-events

    Parameters

    • events: any

      An object containing one or more DOM event types and functions to execute for them.

    Returns IRootElementService

children

  • Get the children of each element in the set of matched elements, optionally filtered by a selector.

    see

    https://api.jquery.com/children/

    Returns IRootElementService

clone

  • Create a deep copy of the set of matched elements.

    see

    https://api.jquery.com/clone/

    Parameters

    • Optional withDataAndEvents: boolean

      A Boolean indicating whether event handlers and data should be copied along with the elements. The default value is false.

    • Optional deepWithDataAndEvents: boolean

      A Boolean indicating whether event handlers and data for all children of the cloned element should be copied. By default its value matches the first argument's value (which defaults to false).

    Returns IRootElementService

contents

  • Get the children of each element in the set of matched elements, including text and comment nodes.

    see

    https://api.jquery.com/contents/

    Returns IRootElementService

controller

  • controller(name?: string): any
  • Parameters

    • Optional name: string

    Returns any

css

  • css(propertyName: string): string
  • css(propertyNames: string[]): any
  • css(propertyName: string, value: string | number): IRootElementService
  • css(propertyName: string, value: (index: number, value: string) => string | number): IRootElementService
  • css(properties: JQLiteCssProperties): IRootElementService
  • Get the value of style properties for the first element in the set of matched elements.

    see

    https://api.jquery.com/css/#css-propertyName

    Parameters

    • propertyName: string

      A CSS property.

    Returns string

  • Get the value of style properties for the first element in the set of matched elements. Results in an object of property-value pairs.

    see

    https://api.jquery.com/css/#css-propertyNames

    Parameters

    • propertyNames: string[]

      An array of one or more CSS properties.

    Returns any

  • Set one or more CSS properties for the set of matched elements.

    see

    https://api.jquery.com/css/#css-propertyName-value

    Parameters

    • propertyName: string

      A CSS property name.

    • value: string | number

      A value to set for the property.

    Returns IRootElementService

  • Set one or more CSS properties for the set of matched elements.

    see

    https://api.jquery.com/css/#css-propertyName-function

    Parameters

    • propertyName: string

      A CSS property name.

    • value: (index: number, value: string) => string | number

      A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old value as arguments.

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

          • index: number
          • value: string

          Returns string | number

    Returns IRootElementService

  • Set one or more CSS properties for the set of matched elements.

    see

    https://api.jquery.com/css/#css-properties

    Parameters

    • properties: JQLiteCssProperties

      An object of property-value pairs to set.

    Returns IRootElementService

data

  • Store arbitrary data associated with the matched elements.

    see

    https://api.jquery.com/data/#data-key-value

    Parameters

    • key: string

      A string naming the piece of data to set.

    • value: any

      The new data value; it can be any JavaScript type including Array or Object.

    Returns IRootElementService

  • Return the value at the named data store for the first element in the jQuery collection, as set by data(name, value) or by an HTML5 data-* attribute.

    see

    https://api.jquery.com/data/#data-key

    Parameters

    • key: string

      Name of the data stored.

    Returns any

  • Store arbitrary data associated with the matched elements.

    see

    https://api.jquery.com/data/#data-obj

    Parameters

    • obj: {}

      An object of key-value pairs of data to update.

      • [key: string]: any

    Returns IRootElementService

  • Return the value at the named data store for the first element in the jQuery collection, as set by data(name, value) or by an HTML5 data-* attribute.

    see

    https://api.jquery.com/data/#data

    Returns any

detach

  • Remove the set of matched elements from the DOM.

    see

    https://api.jquery.com/detach/

    Parameters

    • Optional selector: string

      A selector expression that filters the set of matched elements to be removed.

    Returns IRootElementService

empty

  • Remove all child nodes of the set of matched elements from the DOM.

    see

    https://api.jquery.com/empty/

    Returns IRootElementService

eq

  • Reduce the set of matched elements to the one at the specified index.

    see

    https://api.jquery.com/eq/

    Parameters

    • index: number

      An integer indicating the 0-based position of the element. OR An integer indicating the position of the element, counting backwards from the last element in the set.

    Returns IRootElementService

find

  • Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.

    see

    https://api.jquery.com/find/#find-selector

    Parameters

    • selector: string

      A string containing a selector expression to match elements against.

    Returns IRootElementService

  • Parameters

    • element: any

    Returns IRootElementService

  • Parameters

    • obj: JQuery

    Returns IRootElementService

hasClass

  • hasClass(className: string): boolean
  • Determine whether any of the matched elements are assigned the given class.

    see

    https://api.jquery.com/hasClass/

    Parameters

    • className: string

      The class name to search for.

    Returns boolean

html

  • Get the HTML contents of the first element in the set of matched elements.

    see

    https://api.jquery.com/html/#html

    Returns string

  • Set the HTML contents of each element in the set of matched elements.

    see

    https://api.jquery.com/html/#html-htmlString

    Parameters

    • htmlString: string

      A string of HTML to set as the content of each matched element.

    Returns IRootElementService

  • Set the HTML contents of each element in the set of matched elements.

    see

    https://api.jquery.com/html/#html-function

    Parameters

    • func: (index: number, oldhtml: string) => string

      A function returning the HTML content to set. Receives the index position of the element in the set and the old HTML value as arguments. jQuery empties the element before calling the function; use the oldhtml argument to reference the previous content. Within the function, this refers to the current element in the set.

        • (index: number, oldhtml: string): string
        • Parameters

          • index: number
          • oldhtml: string

          Returns string

    Returns IRootElementService

inheritedData

  • Parameters

    • key: string
    • value: any

    Returns IRootElementService

  • Parameters

    • obj: {}
      • [key: string]: any

    Returns IRootElementService

  • Parameters

    • Optional key: string

    Returns any

injector

  • Returns IInjectorService

isolateScope

  • isolateScope<T>(): T

next

  • Get the immediately following sibling of each element in the set of matched elements. If a selector is provided, it retrieves the next sibling only if it matches that selector.

    see

    https://api.jquery.com/next/

    Returns IRootElementService

off

  • Remove an event handler.

    see

    https://api.jquery.com/off/#off

    Returns IRootElementService

  • Parameters

    • events: string

      One or more space-separated event types and optional namespaces, or just namespaces, such as "click", "keydown.myPlugin", or ".myPlugin".

    • Optional selector: string

      A selector which should match the one originally passed to .on() when attaching event handlers.

    • Optional handler: (eventObject: JQueryEventObject) => any

      A handler function previously attached for the event(s), or the special value false.

        • (eventObject: JQueryEventObject): any
        • Parameters

          • eventObject: JQueryEventObject

          Returns any

    Returns IRootElementService

  • Parameters

    • events: string

      One or more space-separated event types and optional namespaces, or just namespaces, such as "click", "keydown.myPlugin", or ".myPlugin".

    • handler: (eventObject: JQueryEventObject, ...args: any[]) => any

      A handler function previously attached for the event(s), or the special value false. Takes handler with extra args that can be attached with on().

        • (eventObject: JQueryEventObject, ...args: any[]): any
        • Parameters

          • eventObject: JQueryEventObject
          • Rest ...args: any[]

          Returns any

    Returns IRootElementService

  • Parameters

    • events: string

      One or more space-separated event types and optional namespaces, or just namespaces, such as "click", "keydown.myPlugin", or ".myPlugin".

    • handler: (eventObject: JQueryEventObject) => any

      A handler function previously attached for the event(s), or the special value false.

        • (eventObject: JQueryEventObject): any
        • Parameters

          • eventObject: JQueryEventObject

          Returns any

    Returns IRootElementService

  • Parameters

    • events: {}

      An object where the string keys represent one or more space-separated event types and optional namespaces, and the values represent handler functions previously attached for the event(s).

      • [key: string]: any
    • Optional selector: string

      A selector which should match the one originally passed to .on() when attaching event handlers.

    Returns IRootElementService

on

  • on(events: string, handler: (eventObject: JQueryEventObject, ...args: any[]) => any): IRootElementService
  • on(events: string, data: any, handler: (eventObject: JQueryEventObject, ...args: any[]) => any): IRootElementService
  • on(events: string, selector: string, handler: (eventObject: JQueryEventObject, ...eventData: any[]) => any): IRootElementService
  • on(events: string, selector: string, data: any, handler: (eventObject: JQueryEventObject, ...eventData: any[]) => any): IRootElementService
  • on(events: {}, selector?: string, data?: any): IRootElementService
  • on(events: {}, data?: any): IRootElementService
  • Attach an event handler function for one or more events to the selected elements.

    see

    https://api.jquery.com/on/#on-events-selector-data-handler

    Parameters

    • events: string

      One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".

    • handler: (eventObject: JQueryEventObject, ...args: any[]) => any

      A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false. Rest parameter args is for optional parameters passed to jQuery.trigger(). Note that the actual parameters on the event handler function must be marked as optional (? syntax).

        • (eventObject: JQueryEventObject, ...args: any[]): any
        • Parameters

          • eventObject: JQueryEventObject
          • Rest ...args: any[]

          Returns any

    Returns IRootElementService

  • Attach an event handler function for one or more events to the selected elements.

    see

    https://api.jquery.com/on/#on-events-selector-data-handler

    Parameters

    • events: string

      One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".

    • data: any

      Data to be passed to the handler in event.data when an event is triggered.

    • handler: (eventObject: JQueryEventObject, ...args: any[]) => any

      A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false.

        • (eventObject: JQueryEventObject, ...args: any[]): any
        • Parameters

          • eventObject: JQueryEventObject
          • Rest ...args: any[]

          Returns any

    Returns IRootElementService

  • Attach an event handler function for one or more events to the selected elements.

    see

    https://api.jquery.com/on/#on-events-selector-data-handler

    Parameters

    • events: string

      One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".

    • selector: string

      A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element.

    • handler: (eventObject: JQueryEventObject, ...eventData: any[]) => any

      A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false.

        • (eventObject: JQueryEventObject, ...eventData: any[]): any
        • Parameters

          • eventObject: JQueryEventObject
          • Rest ...eventData: any[]

          Returns any

    Returns IRootElementService

  • Attach an event handler function for one or more events to the selected elements.

    see

    https://api.jquery.com/on/#on-events-selector-data-handler

    Parameters

    • events: string

      One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".

    • selector: string

      A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element.

    • data: any

      Data to be passed to the handler in event.data when an event is triggered.

    • handler: (eventObject: JQueryEventObject, ...eventData: any[]) => any

      A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false.

        • (eventObject: JQueryEventObject, ...eventData: any[]): any
        • Parameters

          • eventObject: JQueryEventObject
          • Rest ...eventData: any[]

          Returns any

    Returns IRootElementService

  • Attach an event handler function for one or more events to the selected elements.

    see

    https://api.jquery.com/on/#on-events-selector-data

    Parameters

    • events: {}

      An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s).

      • [key: string]: (eventObject: JQueryEventObject, ...args: any[]) => any
          • (eventObject: JQueryEventObject, ...args: any[]): any
          • Parameters

            • eventObject: JQueryEventObject
            • Rest ...args: any[]

            Returns any

    • Optional selector: string

      A selector string to filter the descendants of the selected elements that will call the handler. If the selector is null or omitted, the handler is always called when it reaches the selected element.

    • Optional data: any

      Data to be passed to the handler in event.data when an event occurs.

    Returns IRootElementService

  • Attach an event handler function for one or more events to the selected elements.

    see

    https://api.jquery.com/on/#on-events-selector-data

    Parameters

    • events: {}

      An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s).

      • [key: string]: (eventObject: JQueryEventObject, ...args: any[]) => any
          • (eventObject: JQueryEventObject, ...args: any[]): any
          • Parameters

            • eventObject: JQueryEventObject
            • Rest ...args: any[]

            Returns any

    • Optional data: any

      Data to be passed to the handler in event.data when an event occurs.

    Returns IRootElementService

one

  • Attach a handler to an event for the elements. The handler is executed at most once per element per event type.

    see

    https://api.jquery.com/one/#one-events-data-handler

    Parameters

    • events: string

      A string containing one or more JavaScript event types, such as "click" or "submit," or custom event names.

    • handler: (eventObject: JQueryEventObject) => any

      A function to execute at the time the event is triggered.

        • (eventObject: JQueryEventObject): any
        • Parameters

          • eventObject: JQueryEventObject

          Returns any

    Returns IRootElementService

  • Attach a handler to an event for the elements. The handler is executed at most once per element per event type.

    see

    https://api.jquery.com/one/#one-events-data-handler

    Parameters

    • events: string

      A string containing one or more JavaScript event types, such as "click" or "submit," or custom event names.

    • data: Object

      An object containing data that will be passed to the event handler.

    • handler: (eventObject: JQueryEventObject) => any

      A function to execute at the time the event is triggered.

        • (eventObject: JQueryEventObject): any
        • Parameters

          • eventObject: JQueryEventObject

          Returns any

    Returns IRootElementService

  • Attach a handler to an event for the elements. The handler is executed at most once per element per event type.

    see

    https://api.jquery.com/one/#one-events-selector-data-handler

    Parameters

    • events: string

      One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".

    • selector: string

      A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element.

    • handler: (eventObject: JQueryEventObject) => any

      A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false.

        • (eventObject: JQueryEventObject): any
        • Parameters

          • eventObject: JQueryEventObject

          Returns any

    Returns IRootElementService

  • Attach a handler to an event for the elements. The handler is executed at most once per element per event type.

    see

    https://api.jquery.com/one/#one-events-selector-data-handler

    Parameters

    • events: string

      One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".

    • selector: string

      A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element.

    • data: any

      Data to be passed to the handler in event.data when an event is triggered.

    • handler: (eventObject: JQueryEventObject) => any

      A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false.

        • (eventObject: JQueryEventObject): any
        • Parameters

          • eventObject: JQueryEventObject

          Returns any

    Returns IRootElementService

  • Attach a handler to an event for the elements. The handler is executed at most once per element per event type.

    see

    https://api.jquery.com/one/#one-events-selector-data

    Parameters

    • events: {}

      An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s).

      • [key: string]: any
    • Optional selector: string

      A selector string to filter the descendants of the selected elements that will call the handler. If the selector is null or omitted, the handler is always called when it reaches the selected element.

    • Optional data: any

      Data to be passed to the handler in event.data when an event occurs.

    Returns IRootElementService

  • Attach a handler to an event for the elements. The handler is executed at most once per element per event type.

    see

    https://api.jquery.com/one/#one-events-selector-data

    Parameters

    • events: {}

      An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s).

      • [key: string]: any
    • Optional data: any

      Data to be passed to the handler in event.data when an event occurs.

    Returns IRootElementService

parent

  • Get the parent of each element in the current set of matched elements, optionally filtered by a selector.

    see

    https://api.jquery.com/parent/

    Returns IRootElementService

prepend

  • prepend(content1: string | any[] | Element | JQuery | DocumentFragment | Text, ...content2: any[]): IRootElementService
  • prepend(func: (index: number, html: string) => string | Element | JQuery): IRootElementService
  • Insert content, specified by the parameter, to the beginning of each element in the set of matched elements.

    see

    https://api.jquery.com/prepend/#prepend-content-content

    Parameters

    • content1: string | any[] | Element | JQuery | DocumentFragment | Text

      DOM element, DocumentFragment, array of elements, HTML string, or jQuery object to insert at the beginning of each element in the set of matched elements.

    • Rest ...content2: any[]

      One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the beginning of each element in the set of matched elements.

    Returns IRootElementService

  • Insert content, specified by the parameter, to the beginning of each element in the set of matched elements.

    see

    https://api.jquery.com/prepend/#prepend-function

    Parameters

    • func: (index: number, html: string) => string | Element | JQuery

      A function that returns an HTML string, DOM element(s), or jQuery object to insert at the beginning of each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set.

        • (index: number, html: string): string | Element | JQuery
        • Parameters

          • index: number
          • html: string

          Returns string | Element | JQuery

    Returns IRootElementService

prop

  • Get the value of a property for the first element in the set of matched elements.

    see

    https://api.jquery.com/prop/#prop-propertyName

    Parameters

    • propertyName: string

      The name of the property to get.

    Returns any

  • Set one or more properties for the set of matched elements.

    see

    https://api.jquery.com/prop/#prop-propertyName-value

    Parameters

    • propertyName: string

      The name of the property to set.

    • value: string | number | boolean

      A value to set for the property.

    Returns IRootElementService

  • Set one or more properties for the set of matched elements.

    see

    https://api.jquery.com/prop/#prop-properties

    Parameters

    • properties: Object

      An object of property-value pairs to set.

    Returns IRootElementService

  • Set one or more properties for the set of matched elements.

    see

    https://api.jquery.com/prop/#prop-propertyName-function

    Parameters

    • propertyName: string

      The name of the property to set.

    • func: (index: number, oldPropertyValue: any) => any

      A function returning the value to set. Receives the index position of the element in the set and the old property value as arguments. Within the function, the keyword this refers to the current element.

        • (index: number, oldPropertyValue: any): any
        • Parameters

          • index: number
          • oldPropertyValue: any

          Returns any

    Returns IRootElementService

ready

  • Specify a function to execute when the DOM is fully loaded.

    see

    https://api.jquery.com/ready/

    Parameters

    • handler: (jQueryAlias?: JQueryStatic) => any

      A function to execute after the DOM is ready.

        • (jQueryAlias?: JQueryStatic): any
        • Parameters

          • Optional jQueryAlias: JQueryStatic

          Returns any

    Returns IRootElementService

remove

  • Remove the set of matched elements from the DOM.

    see

    https://api.jquery.com/remove/

    Parameters

    • Optional selector: string

      A selector expression that filters the set of matched elements to be removed.

    Returns IRootElementService

removeAttr

  • Remove an attribute from each element in the set of matched elements.

    see

    https://api.jquery.com/removeAttr/

    Parameters

    • attributeName: string

      An attribute to remove; as of version 1.7, it can be a space-separated list of attributes.

    Returns IRootElementService

removeClass

  • Remove a single class, multiple classes, or all classes from each element in the set of matched elements.

    see

    https://api.jquery.com/removeClass/#removeClass-className

    Parameters

    • Optional className: string

      One or more space-separated classes to be removed from the class attribute of each matched element.

    Returns IRootElementService

removeData

replaceWith

  • Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed.

    see

    https://api.jquery.com/replaceWith/#replaceWith-newContent

    Parameters

    • newContent: string | any[] | Element | JQuery | Text

      The content to insert. May be an HTML string, DOM element, array of DOM elements, or jQuery object.

    Returns IRootElementService

  • Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed.

    see

    https://api.jquery.com/replaceWith/#replaceWith-function

    Parameters

    • func: () => Element | JQuery

      A function that returns content with which to replace the set of matched elements.

        • (): Element | JQuery
        • Returns Element | JQuery

    Returns IRootElementService

scope

  • scope<T>(): T

text

  • Get the combined text contents of each element in the set of matched elements, including their descendants.

    see

    https://api.jquery.com/text/#text

    Returns string

  • Set the content of each element in the set of matched elements to the specified text.

    see

    https://api.jquery.com/text/#text-text

    Parameters

    • text: string | number | boolean

      The text to set as the content of each matched element. When Number or Boolean is supplied, it will be converted to a String representation.

    Returns IRootElementService

  • Set the content of each element in the set of matched elements to the specified text.

    see

    https://api.jquery.com/text/#text-function

    Parameters

    • func: (index: number, text: string) => string

      A function returning the text content to set. Receives the index position of the element in the set and the old text value as arguments.

        • (index: number, text: string): string
        • Parameters

          • index: number
          • text: string

          Returns string

    Returns IRootElementService

toggleClass

  • Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument.

    see

    https://api.jquery.com/toggleClass/#toggleClass-className

    Parameters

    • className: string

      One or more class names (separated by spaces) to be toggled for each element in the matched set.

    • Optional swtch: boolean

      A Boolean (not just truthy/falsy) value to determine whether the class should be added or removed.

    Returns IRootElementService

  • Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument.

    see

    https://api.jquery.com/toggleClass/#toggleClass-state

    Parameters

    • Optional swtch: boolean

      A boolean value to determine whether the class should be added or removed.

    Returns IRootElementService

triggerHandler

  • triggerHandler(eventType: string, ...extraParameters: any[]): Object
  • triggerHandler(event: JQueryEventObject, ...extraParameters: any[]): Object
  • Execute all handlers attached to an element for an event.

    see

    https://api.jquery.com/triggerHandler/#triggerHandler-eventType-extraParameters

    Parameters

    • eventType: string

      A string containing a JavaScript event type, such as click or submit.

    • Rest ...extraParameters: any[]

      An array of additional parameters to pass along to the event handler.

    Returns Object

  • Execute all handlers attached to an element for an event.

    see

    https://api.jquery.com/triggerHandler/#triggerHandler-event-extraParameters

    Parameters

    • event: JQueryEventObject

      A jQuery.Event object.

    • Rest ...extraParameters: any[]

      An array of additional parameters to pass along to the event handler.

    Returns Object

unbind

  • Remove a previously-attached event handler from the elements.

    see

    https://api.jquery.com/unbind/#unbind-eventType-handler

    Parameters

    • Optional eventType: string

      A string containing a JavaScript event type, such as click or submit.

    • Optional handler: (eventObject: JQueryEventObject) => any

      The function that is to be no longer executed.

        • (eventObject: JQueryEventObject): any
        • Parameters

          • eventObject: JQueryEventObject

          Returns any

    Returns IRootElementService

  • Remove a previously-attached event handler from the elements.

    see

    https://api.jquery.com/unbind/#unbind-eventType-false

    Parameters

    • eventType: string

      A string containing a JavaScript event type, such as click or submit.

    • fls: boolean

      Unbinds the corresponding 'return false' function that was bound using .bind( eventType, false ).

    Returns IRootElementService

  • Remove a previously-attached event handler from the elements.

    see

    https://api.jquery.com/unbind/#unbind-event

    Parameters

    • evt: any

      A JavaScript event object as passed to an event handler.

    Returns IRootElementService

val

  • Get the current value of the first element in the set of matched elements.

    see

    https://api.jquery.com/val/#val

    Returns any

  • Set the value of each element in the set of matched elements.

    see

    https://api.jquery.com/val/#val-value

    Parameters

    • value: string | number | string[]

      A string of text, an array of strings or number corresponding to the value of each matched element to set as selected/checked.

    Returns IRootElementService

  • Set the value of each element in the set of matched elements.

    see

    https://api.jquery.com/val/#val-function

    Parameters

    • func: (index: number, value: string) => string

      A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old value as arguments.

        • (index: number, value: string): string
        • Parameters

          • index: number
          • value: string

          Returns string

    Returns IRootElementService

wrap

  • Wrap an HTML structure around each element in the set of matched elements.

    see

    https://api.jquery.com/wrap/#wrap-wrappingElement

    Parameters

    • wrappingElement: string | Element | JQuery

      A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements.

    Returns IRootElementService

  • Wrap an HTML structure around each element in the set of matched elements.

    see

    https://api.jquery.com/wrap/#wrap-function

    Parameters

    • func: (index: number) => string | JQuery

      A callback function returning the HTML content or jQuery object to wrap around the matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.

        • (index: number): string | JQuery
        • Parameters

          • index: number

          Returns string | JQuery

    Returns IRootElementService

Generated using TypeDoc