diff --git a/_includes/nav-javascript.html b/_includes/nav-javascript.html index 13079580b8..365fe1a103 100644 --- a/_includes/nav-javascript.html +++ b/_includes/nav-javascript.html @@ -16,13 +16,73 @@
Add dropdown menus to nearly anything with this simple plugin, including the navbar, tabs, and pills.
Add data-toggle="dropdown"
to a link or button to toggle a dropdown.
The ScrollSpy plugin is for automatically updating nav targets based on scroll position. Scroll the area below the navbar and watch the active class change. The dropdown sub items will be highlighted as well.
To easily add scrollspy behavior to your topbar navigation, add data-spy="scroll"
to the element you want to spy on (most typically this would be the <body>
. Then add the data-target
attribute with the ID or class of the parent element of any Bootstrap .nav
component.
Add quick, dynamic tab functionality to transition through panes of local content, even via dropdown menus.
Inspired by the excellent jQuery.tipsy plugin written by Jason Frame; Tooltips are an updated version, which don't rely on images, use CSS3 for animations, and data-attributes for local title storage.
Hover over the links below to see tooltips:
Trigger the tooltip via JavaScript:
{% highlight js %} $('#example').tooltip(options) @@ -878,7 +878,7 @@ $('#example').tooltip(options)Add small overlays of content, like those on the iPad, to any element for housing secondary information. Hover over the button to trigger the popover.
Enable popovers via JavaScript:
{% highlight js %}$('#example').popover(options){% endhighlight %} @@ -1058,13 +1058,13 @@ $('#example').tooltip(options) -Add dismiss functionality to all alert messages with this plugin.
Enable dismissal of an alert via JavaScript:
{% highlight js %}$(".alert").alert(){% endhighlight %} @@ -1142,7 +1142,7 @@ $('#my-alert').bind('closed.bs.alert', function () {Do more with buttons. Control button states or create groups of buttons for more components like toolbars.
Enable buttons via JavaScript:
{% highlight js %} $('.nav-tabs').button() @@ -1295,7 +1295,7 @@ $('.nav-tabs').button()Collapse requires the transitions plugin to be included in your version of Bootstrap.
Using the collapse plugin, we built a simple accordion style widget:
Just add data-toggle="collapse"
and a data-target
to element to automatically assign control of a collapsible element. The data-target
attribute accepts a CSS selector to apply the collapse to. Be sure to add the class collapse
to the collapsible element. If you'd like it to default open, add the additional class in
.
The slideshow below shows a generic plugin and component for cycling through elements like a carousel.
The subnavigation on the left is a live demo of the affix plugin.
To easily add affix behavior to any element, just add data-spy="affix"
to the element you want to spy on. Then use offsets to define when to toggle the pinning of an element on and off.