-
Notifications
You must be signed in to change notification settings - Fork 135
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.
-
Methods
- get(id)
-
hasClass(obj, name)
static
-
addClass(obj, name)
static
-
removeClass(obj, name)
static
-
getStyle(obj, name)
static
-
getPos(node, root)
static
-
getSize(node)
static
Get DOM Element by it's id.
Arguments
-
id
String
Identifier of the DOM Element
hasClass(obj, name) static
Checks if specified DOM element has specified class.
Arguments
-
obj
Object
DOM element like object to add handler to. -
name
String
Class name
addClass(obj, name) static
Adds specified className to specified DOM element.
Arguments
-
obj
Object
DOM element like object to add handler to. -
name
String
Class name
removeClass(obj, name) static
Removes specified className from specified DOM element.
Arguments
-
obj
Object
DOM element like object to add handler to. -
name
String
Class name
getStyle(obj, name) static
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
getPos(node, root) static
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.