Functions
- addCssClass
- addElement
- createBrowserEvent
- domel
- getDocSize
- getElementAbsolutePos
- getScrollPos
- getViewportSize
- getWinSize
- hideElement
- isVisible
- mask
- showElement
- slideDown
- slideUp
- toggleVisibility
- wrapInner
addCssClass
Section titled “addCssClass”Adds css class to the html element.
▸ addCssClass(element: HTMLElement,className: string): void
Parameters:
Section titled “Parameters:”- element:
HTMLElement- The element to add css class to. - className:
string- The name of the css class to be added.
Returns void
addElement
Section titled “addElement”Creates ands adds a new [[HTMLElement]] to “parent”
▸ addElement(parent: HTMLElement,tag: string,options?: any): HTMLElement
Parameters:
Section titled “Parameters:”- parent:
HTMLElement- The element to add new element to. - tag:
string- Html tag of the new element. - options:
any, Optional - The options. In particular, options.cssClass sets the new element class.
Returns HTMLElement - New element.
createBrowserEvent
Section titled “createBrowserEvent”▸ createBrowserEvent(eventName: any): any
Parameters:
Section titled “Parameters:”- eventName:
any
Returns any
▸ domel(tag: "div" | HTMLDivElement,parent?: HTMLElement): DomElementBuilder<HTMLDivElement>
Parameters:
Section titled “Parameters:”- tag:
"div"|HTMLDivElement - parent:
HTMLElement, Optional
Returns DomElementBuilder<HTMLDivElement>
▸ domel(tag: "span" | HTMLSpanElement,parent?: HTMLElement): DomElementBuilder<HTMLSpanElement>
Parameters:
Section titled “Parameters:”- tag:
"span"|HTMLSpanElement - parent:
HTMLElement, Optional
Returns DomElementBuilder<HTMLSpanElement>
▸ domel(tag: "a" | HTMLAnchorElement,parent?: HTMLElement): DomElementBuilder<HTMLAnchorElement>
Parameters:
Section titled “Parameters:”- tag:
"a"|HTMLAnchorElement - parent:
HTMLElement, Optional
Returns DomElementBuilder<HTMLAnchorElement>
▸ domel(tag: "button" | HTMLButtonElement,parent?: HTMLElement): DomElementBuilder<HTMLButtonElement>
Parameters:
Section titled “Parameters:”- tag:
"button"|HTMLButtonElement - parent:
HTMLElement, Optional
Returns DomElementBuilder<HTMLButtonElement>
▸ domel(tag: "img" | HTMLImageElement,parent?: HTMLElement): DomElementBuilder<HTMLImageElement>
Parameters:
Section titled “Parameters:”- tag:
"img"|HTMLImageElement - parent:
HTMLElement, Optional
Returns DomElementBuilder<HTMLImageElement>
▸ domel(tag: "input" | HTMLInputElement,parent?: HTMLElement): DomInputElementBuilder
Parameters:
Section titled “Parameters:”- tag:
"input"|HTMLInputElement - parent:
HTMLElement, Optional
Returns DomInputElementBuilder
▸ domel(tag: "select" | HTMLInputElement,parent?: HTMLElement): DomSelectElementBuilder
Parameters:
Section titled “Parameters:”- tag:
"select"|HTMLInputElement - parent:
HTMLElement, Optional
Returns DomSelectElementBuilder
▸ domel(tag: string,parent?: HTMLElement): DomElementBuilder<HTMLElement>
Parameters:
Section titled “Parameters:”- tag:
string - parent:
HTMLElement, Optional
Returns DomElementBuilder<HTMLElement>
getDocSize
Section titled “getDocSize”▸ getDocSize(): any
Returns any
getElementAbsolutePos
Section titled “getElementAbsolutePos”▸ getElementAbsolutePos(element: HTMLElement): any
Parameters:
Section titled “Parameters:”- element:
HTMLElement
Returns any
getScrollPos
Section titled “getScrollPos”▸ getScrollPos(): any
Returns any
getViewportSize
Section titled “getViewportSize”▸ getViewportSize(): any
Returns any
getWinSize
Section titled “getWinSize”▸ getWinSize(): any
Returns any
hideElement
Section titled “hideElement”Hides the html element.
▸ hideElement(element: HTMLElement): void
Parameters:
Section titled “Parameters:”- element:
HTMLElement- The element to be hidden.
Returns void
isVisible
Section titled “isVisible”Checks if element is visible
▸ isVisible(element: HTMLElement): boolean
Parameters:
Section titled “Parameters:”- element:
HTMLElement- The element to check.
Returns boolean - true if visible, otherwise - false.
▸ mask(input: HTMLInputElement,maskPattern: string): void
Parameters:
Section titled “Parameters:”- input:
HTMLInputElement - maskPattern:
string
Returns void
showElement
Section titled “showElement”Shows the html element.
▸ showElement(element: HTMLElement,display?: string): void
Parameters:
Section titled “Parameters:”- element:
HTMLElement- The element to be shown. - display:
string, Optional - The value of “display” style to be set. Default value is “block”.
Returns void
slideDown
Section titled “slideDown”▸ slideDown(target: HTMLElement,duration: number,callback?: () => void): void
Parameters:
Section titled “Parameters:”- target:
HTMLElement - duration:
number - callback: () =>
void, Optional
Returns void
slideUp
Section titled “slideUp”▸ slideUp(target: HTMLElement,duration: number,callback?: () => void): void
Parameters:
Section titled “Parameters:”- target:
HTMLElement - duration:
number - callback: () =>
void, Optional
Returns void
toggleVisibility
Section titled “toggleVisibility”Hides the “first” element and shows the “second”.
▸ toggleVisibility(first: HTMLElement,second: HTMLElement,options: any): void
Parameters:
Section titled “Parameters:”- first:
HTMLElement- The element to be hidden. - second:
HTMLElement- The element to be shown. - options:
any- The options. The following options are applied: - display - the value of “display” style to be set. Default value is “block”
- duration - the duration of fading in and out
- complete - the callback to be called when toggle is complete
Returns void
wrapInner
Section titled “wrapInner”Wraps all the elements inside “parent” by “wrapper” element
▸ wrapInner(parent: HTMLElement,wrapper: HTMLElement): void
Parameters:
Section titled “Parameters:”- parent:
HTMLElement- The element to add wrapper to. - wrapper:
HTMLElement- The element that will wrap child elements.
Returns void