From 75f5a70f7d86797913fb412ded4d2fd1c7061168 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 26 Jul 2013 16:52:09 -0700 Subject: [PATCH] Fixes #8293: sub nav links in JS docs --- _includes/nav-javascript.html | 80 ++++++++++++++++++++++++++++++----- javascript.html | 42 +++++++++--------- 2 files changed, 91 insertions(+), 31 deletions(-) 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 @@
  • Usage
  • -
  • Dropdown
  • -
  • Scrollspy
  • -
  • Tab
  • -
  • Tooltip
  • -
  • Popover
  • -
  • Alert
  • -
  • Button
  • -
  • Collapse
  • -
  • Carousel
  • -
  • Affix
  • +
  • + Dropdown + +
  • +
  • + Scrollspy + +
  • +
  • + Tab + +
  • +
  • + Tooltip + +
  • +
  • + Popover + +
  • +
  • + Alert + +
  • +
  • + Button + +
  • +
  • + Collapse + +
  • +
  • + Carousel + +
  • +
  • + Affix + +
  • diff --git a/javascript.html b/javascript.html index 0259108d71..4602a0311d 100644 --- a/javascript.html +++ b/javascript.html @@ -345,7 +345,7 @@ $('#myModal').on('hidden.bs.modal', function () { -

    Examples

    +

    Add dropdown menus to nearly anything with this simple plugin, including the navbar, tabs, and pills.

    Within a navbar

    @@ -439,7 +439,7 @@ $('#myModal').on('hidden.bs.modal', function () {
    -

    Usage

    +

    Via data attributes

    Add data-toggle="dropdown" to a link or button to toggle a dropdown.

    @@ -487,7 +487,7 @@ $('.dropdown-toggle').dropdown() -

    Example in navbar

    +

    Example in navbar

    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.

    -

    Usage

    +

    Usage

    Via data attributes

    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.

    @@ -611,7 +611,7 @@ $('#myScrollspy').on('activate.bs.scrollspy', function () {
    -

    Example tabs

    +

    Example tabs

    Add quick, dynamic tab functionality to transition through panes of local content, even via dropdown menus.

    -

    Examples

    +

    Examples

    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:

    @@ -763,7 +763,7 @@ $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
    -

    Usage

    +

    Usage

    Trigger the tooltip via JavaScript:

    {% highlight js %} $('#example').tooltip(options) @@ -878,7 +878,7 @@ $('#example').tooltip(options)

    Popovers popover.js

    -

    Examples

    +

    Examples

    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.

    @@ -947,7 +947,7 @@ $('#example').tooltip(options)
    -

    Usage

    +

    Usage

    Enable popovers via JavaScript:

    {% highlight js %}$('#example').popover(options){% endhighlight %} @@ -1058,13 +1058,13 @@ $('#example').tooltip(options) -
    +
    -

    Example alerts

    +

    Example alerts

    Add dismiss functionality to all alert messages with this plugin.

    @@ -1088,7 +1088,7 @@ $('#example').tooltip(options)
    -

    Usage

    +

    Usage

    Enable dismissal of an alert via JavaScript:

    {% highlight js %}$(".alert").alert(){% endhighlight %} @@ -1142,7 +1142,7 @@ $('#my-alert').bind('closed.bs.alert', function () {

    Buttons button.js

    -

    Example uses

    +

    Example uses

    Do more with buttons. Control button states or create groups of buttons for more components like toolbars.

    Stateful

    @@ -1229,7 +1229,7 @@ $('#my-alert').bind('closed.bs.alert', function () {
    -

    Usage

    +

    Usage

    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.

    -

    Example accordion

    +

    Example accordion

    Using the collapse plugin, we built a simple accordion style widget:

    @@ -1392,7 +1392,7 @@ $('.nav-tabs').button()
    -

    Usage

    +

    Usage

    Via data attributes

    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.

    @@ -1497,7 +1497,7 @@ $('#myCollapsible').on('hidden.bs.collapse', function () {

    Carousel carousel.js

    -

    Examples

    +

    The slideshow below shows a generic plugin and component for cycling through elements like a carousel.

    -

    Example

    +

    Example

    The subnavigation on the left is a live demo of the affix plugin.


    -

    Usage

    +

    Usage

    Via data attributes

    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.