Options:

Option Type Default Description
position string top Position relative to the element the plugin is attached to. Valid options: top, bottom, left, right
autoOpen bool false Indicates whether the overlay should open when the plugin is initialized
width mixed auto Overlay width
height mixed auto Overlay height
maxWidth mixed null Overlay max-width
maxHeight mixed null Overlay max-height
html string null HTML content to insert in overlay
text string null Text content to insert in overlay
distance int 5 Number of pixels the overlay should appear from element.
xpos int null Absolute position from the left
ypos int null Absolute position from the top

Events:

beforeOpen
fires before the popover opens
open
fires after the popover opens
close
fires after close

Methods:

html
Inserts html, replacing the contents of the popover
append
Appends content to the popover
open
Opens the popover
close
Closes the popover

4 Postions

Top | Bottom | Left | Right

Using Delegation

The following example initializes and opens a new popover each time a user clicks a link. This reduces the plugin's memory footprint and initialization cost when a large number of popover items exists on a page.