setPosition: Element Positioning jQuery Plugin

setPosition

Latest release: 1.0 (July 8, 2011)

setPosition is a plugin designed only to help aid in positioning elements within a page. It is designed to change the position relative to the window each time and to be as simple as possible to implement.

If you need help or have feature requests, feel free to post in our forum.

Examples
Download the latest version

Setup

<script type=”text/javascript” language=”JavaScript” src=”js/setPosition.md.js”> </script>

Usage

$(‘div’).setPosition(‘text’,{options});
or
$(‘div’).setPosition(‘text’);

Allowed text values: center, top, bottom, left, right, reset or any pixel value
‘Reset’ places the element back in it’s original state
Values can be doubled to position vertically and horizontally (eg. ‘top left’ or ‘center 300′)
Pixel values should NOT include ‘px’.

Properties

saveSpace
When set to false, the original dimensions and location of the element are not changed

Default: true
Type: Boolean

zIndex
Sets the z-index property of the element

Default: 9999
Type: Integer

Changelog

1.0

  • Initial release!