$pos
Set the element coordinates.
$pos( element, x, y )
element [object]
The target element.x [number]
The CSS left value of element.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