pos

returns the position of the mouse pointer relative to the upper-left corner of the screen

object pos(Event ev);

Parameters

evEventa native HTML event

Returns

objectthe position object

Example

<input type="radio" id="myradio" name="Color" value="Blue">
document.getElementById("myradio").onclick = function (e){
    var pos = webix.html.pos(e||event);
    console.log(pos);                   //returns { x:21, y:500 }
}

See also
Back to top