Started

Selectors

Utilities

Animation

AJAX

CSS

Event

Manipulation

Cookie

String

Attributes

Data

Storage

Miscellaneous

$pos

Set the element coordinates.
$pos( element, x, y )
  1. element [object]
    The target element.
  2. x [number]
    The CSS left value of element.
  3. y [number]
    The CSS top value of element.

Notes

This element position must be relative or absolute.

Example

HTML code
<div id="box">This is a box</div>
<button onclick="start_pos()">Set box coordinates</button>
CSS code
#box {
	width: 200px;
	height: 60px;
	font-size: 12px;
	background: #5599bb;
	padding: 10px;
	position: relative;
}
JavaScript code
function start_pos()
{
	$pos($("box"), 250, 20);
}
Demonstration
This is a box