gamvas.dom

A collection of static DOM helper and utility functions

Summary
gamvas.domA collection of static DOM helper and utility functions
Functions
getPositionGets the position of a DOM element

Functions

getPosition

getPosition: function(el)

Gets the position of a DOM element

Parameters

elThe DOM element

Returns

gamvas.Vector2D

Example

var el = document.getElementById('myelement');
var pos = gamvas.dom.getPosition(el);
alert('myelement is at position '+pos.x+','+pos.y);
getPosition: function(el)
Gets the position of a DOM element
A 2D vector class
Close