Skip to content

moxie.core.utils.Dom

Davit Barbakadze edited this page Aug 5, 2017 · 1 revision

Important! This page is auto-generated from the comments in the source files. All changes will be overwritten! If you are looking to contribute, modify the comment in the corresponding source file instead.

Module: moxie.core.utils.Dom

Table of Contents

Methods

Get DOM Element by it's id.

Arguments

  • id String
    Identifier of the DOM Element

Checks if specified DOM element has specified class.

Arguments

  • obj Object
    DOM element like object to add handler to.
  • name String
    Class name

Adds specified className to specified DOM element.

Arguments

  • obj Object
    DOM element like object to add handler to.
  • name String
    Class name

Removes specified className from specified DOM element.

Arguments

  • obj Object
    DOM element like object to add handler to.
  • name String
    Class name

Returns a given computed style of a DOM element.

Arguments

  • obj Object
    DOM element like object.
  • name String
    Style you want to get from the DOM element

Returns the absolute x, y position of an Element. The position will be returned in a object with x, y fields.

Arguments

  • node Element
    HTML element or element id to get x, y position from.
  • root Element
    Optional root element to stop calculations at.

getSize(node) static

Returns the size of the specified node in pixels.

Arguments

  • node Node
    Node to get the size of.