0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-11-29 11:24:18 +01:00
Bootstrap/docs/javascript/modal.md
2014-07-12 02:17:42 -07:00

16 KiB
Raw Blame History

Modals modal.js

Examples

Modals are streamlined, but flexible, dialog prompts with the minimum required functionality and smart defaults.

Overlapping modals not supported

Be sure not to open a modal while another is still visible. Showing more than one modal at a time requires custom code.

Modal markup placement

Always try to place a modal's HTML code in a top-level position in your document to avoid other components affecting the modal's appearance and/or functionality.

Mobile device caveats

There are some caveats regarding using modals on mobile devices. See our browser support docs for details.

Static example

A rendered modal with header, body, and set of actions in the footer.

Close

Modal title

One fine body…

Close Save changes
{% highlight html %}
Close

Modal title

One fine body…

Close Save changes
{% endhighlight %}

Live demo

Toggle a modal via JavaScript by clicking the button below. It will slide down and fade in from the top of the page.