Menu


            Home  /  Features  /  Popovers

Static popover

Four options are available: top, right, bottom, and left aligned.

Popover top

Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.

Popover right

Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.

Popover bottom

Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.

Popover left

Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.

No markup shown as popovers are generated from JavaScript and content within a data attribute.

Live demo

<a data-content="And here's some amazing content. It's very engaging. right?" rel="popover" class="Popovers btn btn-large btn-danger" href="javascript:void(0)" data-original-title="A Title">Click to toggle popover

Four directions


Usage

Enable popovers via JavaScript:

  1. <a data-original-title="A Title" href="javascript:void(0)" class="Popovers btn btn-large btn-danger" rel="popover" data-content="And here's some amazing content. It's very engaging. right?">Click to toggle popover</a>
  2. <a data-original-title="Popover on top" href="javascript:void(0)" class="Popovers btn" rel="popover" data-placement="top" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">Popover on top</a>
  3. <a data-original-title="Popover on right" href="javascript:void(0)" class="Popovers btn" rel="popover" data-placement="right" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">Popover on right</a>
  4. <a data-original-title="Popover on bottom" href="javascript:void(0)" class="Popovers btn" rel="popover" data-placement="bottom" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">Popover on bottom</a>
  5. <a data-original-title="Popover on left" href="javascript:void(0)" class="Popovers btn" rel="popover" data-placement="left" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">Popover on left</a>

Options

Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-animation="".

Nametypedefaultdescription
animationbooleantrueapply a css fade transition to the tooltip
htmlbooleanfalseInsert html into the popover. If false, jquery's text method will be used to insert content into the dom. Use text if you're worried about XSS attacks.
placementstring|function'right'how to position the popover - top | bottom | left | right
selectorstringfalseif a selector is provided, tooltip objects will be delegated to the specified targets
triggerstring'click'how popover is triggered - click | hover | focus | manual
titlestring | function''default title value if `title` attribute isn't present
contentstring | function''default content value if `data-content` attribute isn't present
delaynumber | object0

delay showing and hiding the popover (ms) - does not apply to manual trigger type

If a number is supplied, delay is applied to both hide/show

Object structure is: delay: { show: 500, hide: 100 }

Heads up! Options for individual popovers can alternatively be specified through the use of data attributes.