O'Reilly logo

jQuery UI 1.10: The User Interface Library for jQuery by Dan Wellman, Alex Libby

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The position utility

The position utility is a powerful stand-alone utility that is used to position any element relative to the window, the document, a specific element, or the mouse pointer. It is unique among library components, in that it doesn't require jquery.ui.core.js or jquery.effects.core.js as dependencies.

It exposes no unique or custom methods (other than the position() method), and fires no events, but it does come with a series of configuration options that allow us to use it. These options are listed in the following table:

Option

Format

Used to

at

string

Specify the edges of the element that is being positioned against. Formatted as, for example, left bottom.

collision

string

Move the positioned element to an alternative ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required