From: Mark Otto Date: Wed, 6 Jun 2012 01:25:46 +0000 (-0700) Subject: updated javascripts for first pass at single column X-Git-Tag: v2.1.0~2^2~308 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8ee067952202cc8a6e4865eab46598e346ad3971;p=thirdparty%2Fbootstrap.git updated javascripts for first pass at single column --- diff --git a/docs/assets/css/docs.css b/docs/assets/css/docs.css index 1df8827991..45c6693a7e 100644 --- a/docs/assets/css/docs.css +++ b/docs/assets/css/docs.css @@ -23,6 +23,47 @@ li { line-height: 20px; } +.bs-docs-nav { + display: none; + position: fixed; + top: 0; + left: 0; + bottom: 0; + overflow-y: scroll; + width: 140px; + padding: 25px 30px; + background-color: #eee; + text-shadow: 0 1px 0 rgba(255,255,255,.5); +} +.bs-docs-nav ul { + margin-left: 0; + margin-bottom: 10px; +} +.bs-docs-nav ul li { + list-style: none; +} +.bs-docs-nav a { + font-size: 13px; + line-height: 20px; +} +.bs-docs-nav > ul > li > a { + font-size: 14px; + color: #999; +} + +.bs-docs-wrapper { + position: fixed; + top: 0; + left: 200px; + right: 0; + bottom: 0; + padding: 40px 0; + overflow-y: scroll; + -webkit-box-shadow: -10px 0 15px rgba(0,0,0,.05), -5px 0 10px rgba(0,0,0,.05); + -moz-box-shadow: -10px 0 15px rgba(0,0,0,.05), -5px 0 10px rgba(0,0,0,.05); + box-shadow: -10px 0 15px rgba(0,0,0,.05), -5px 0 10px rgba(0,0,0,.05); +} + .bs-docs-container { max-width: 780px; margin: 0 auto; @@ -69,13 +110,13 @@ hr.soften { /* Table of contents */ .bs-docs-contents { - color: #999; } .bs-docs-contents h3 { } .bs-docs-contents li { line-height: 25px; + color: #777; } @@ -85,7 +126,7 @@ hr.soften { position: relative; } .jumbotron h1 { - margin-bottom: 9px; + margin-bottom: 10px; font-size: 80px; font-weight: bold; letter-spacing: -1px; @@ -110,8 +151,8 @@ hr.soften { /* Masthead (docs home) */ .masthead { - padding-top: 36px; - margin-bottom: 72px; + padding-top: 40px; + margin-bottom: 60px; } .masthead h1, .masthead p { @@ -122,7 +163,7 @@ hr.soften { } .masthead p { font-size: 30px; - line-height: 36px; + line-height: 35px; } @@ -130,12 +171,15 @@ hr.soften { ------------------------- */ /* supporting docs pages */ .subhead { - padding-bottom: 0; - margin-bottom: 9px; - border-bottom: 1px solid #ddd; + padding-bottom: 12px; + margin-bottom: 10px; + border-bottom: 1px solid #e5e5e5; } .subhead h1 { - font-size: 54px; + font-size: 60px; +} +.subhead .lead { + line-height: 25px; } /* Subnav */ diff --git a/docs/assets/js/application.js b/docs/assets/js/application.js index 6463b902fb..18bcda6c9f 100644 --- a/docs/assets/js/application.js +++ b/docs/assets/js/application.js @@ -70,7 +70,7 @@ } // tooltip demo - $('.tooltip-demo.well').tooltip({ + $('.tooltip-demo').tooltip({ selector: "a[rel=tooltip]" }) diff --git a/docs/base-css.html b/docs/base-css.html index 95b4f1f97a..16eca66c76 100644 --- a/docs/base-css.html +++ b/docs/base-css.html @@ -74,6 +74,89 @@ +
+ + +
+
+
diff --git a/docs/components.html b/docs/components.html index 72b86200f8..b2f2d0afcd 100644 --- a/docs/components.html +++ b/docs/components.html @@ -74,6 +74,89 @@
+
+ + +
+
+
  • + Scaffolding + +
  • +
  • + Base CSS + +
  • +
  • + Components + +
  • +
  • + Javascript + +
  • +
  • + LESS + +
  • +
  • + Customize +
  • +
  • + Examples +
  • + +
    +
    +
  • + Scaffolding + +
  • +
  • + Base CSS + +
  • +
  • + Components + +
  • +
  • + Javascript + +
  • +
  • + LESS + +
  • +
  • + Customize +
  • +
  • + Examples +
  • + +
    +
    +
  • + Scaffolding + +
  • +
  • + Base CSS + +
  • +
  • + Components + +
  • +
  • + Javascript + +
  • +
  • + LESS + +
  • +
  • + Customize +
  • +
  • + Examples +
  • + +
    +
    +
  • + Scaffolding + +
  • +
  • + Base CSS + +
  • +
  • + Components + +
  • +
  • + Javascript + +
  • +
  • + LESS + +
  • +
  • + Customize +
  • +
  • + Examples +
  • + +
    +
    -
    -
    - - +

    Methods

    +

    $().dropdown()

    +

    A programatic api for activating menus for a given navbar or tabbed navigation.

    + - -
    - -
    -
    -

    The ScrollSpy plugin is for automatically updating nav targets based on scroll position.

    - Download file + +
    + + +

    The ScrollSpy plugin is for automatically updating nav targets based on scroll position.

    + Download file + +

    Example navbar with scrollspy

    +

    Scroll the area below and watch the navigation update. The dropdown sub items will be highlighted as well. Try it!

    +
    + + +
    +

    Using bootstrap-scrollspy.js

    +

    Call the scrollspy via javascript:

    +
    $('#navbar').scrollspy()
    +

    Markup

    +

    To easily add scrollspy behavior to your topbar navigation, just add data-spy="scroll" to the element you want to spy on (most typically this would be the body).

    +
    <body data-spy="scroll" >...</body>
    +
    + Heads up! + Navbar links must have resolvable id targets. For example, a <a href="#home">home</a> must correspond to something in the dom like <div id="home"></div>. +
    +

    Methods

    +

    .scrollspy('refresh')

    +

    When using scrollspy in conjunction with adding or removing of elements from the DOM, you'll need to call the refresh method like so:

     $('[data-spy="scroll"]').each(function () {
       var $spy = $(this).scrollspy('refresh')
     });
     
    -

    Options

    - - - - - - - - - - - - - - - - - -
    Nametypedefaultdescription
    offsetnumber10Pixels to offset from top when calculating position of scroll.
    -

    Events

    - - - - - - - - - - - - - -
    EventDescription
    activateThis event fires whenever a new item becomes activated by the scrollspy.
    -
    -
    -
    +

    Options

    + + + + + + + + + + + + + + + + + +
    Nametypedefaultdescription
    offsetnumber10Pixels to offset from top when calculating position of scroll.
    +

    Events

    + + + + + + + + + + + + + +
    EventDescription
    activateThis event fires whenever a new item becomes activated by the scrollspy.
    + - -
    -
    - -
    - -
    -
    -

    About Tooltips

    -

    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.

    - Download file -
    -
    -

    Example use of Tooltips

    -

    Hover over the links below to see tooltips:

    -
    -

    Tight pants next level keffiyeh you probably haven't heard of them. Photo booth beard raw denim letterpress vegan messenger bag stumptown. Farm-to-table seitan, mcsweeney's fixie sustainable quinoa 8-bit american apparel have a terry richardson vinyl chambray. Beard stumptown, cardigans banh mi lomo thundercats. Tofu biodiesel williamsburg marfa, four loko mcsweeney's cleanse vegan chambray. A really ironic artisan whatever keytar, scenester farm-to-table banksy Austin twitter handle freegan cred raw denim single-origin coffee viral. -

    -
    -
    -

    Using bootstrap-tooltip.js

    -

    Trigger the tooltip via javascript:

    -
    $('#example').tooltip(options)
    -

    Options

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Nametypedefaultdescription
    animationbooleantrueapply a css fade transition to the tooltip
    htmlbooleantrueInsert html into the tooltip. 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'top'how to position the tooltip - top | bottom | left | right
    selectorstringfalseIf a selector is provided, tooltip objects will be delegated to the specified targets.
    titlestring | function''default title value if `title` tag isn't present
    triggerstring'hover'how tooltip is triggered - hover | focus | manual
    delaynumber | object0 -

    delay showing and hiding the tooltip (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 tooltips can alternatively be specified through the use of data attributes. -
    -

    Markup

    -

    For performance reasons, the Tooltip and Popover data-apis are opt in. If you would like to use them just specify a selector option.

    + +
    + + +

    About Tooltips

    +

    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.

    + Download file + +

    Example use of Tooltips

    +

    Hover over the links below to see tooltips:

    +
    +

    Tight pants next level keffiyeh you probably haven't heard of them. Photo booth beard raw denim letterpress vegan messenger bag stumptown. Farm-to-table seitan, mcsweeney's fixie sustainable quinoa 8-bit american apparel have a terry richardson vinyl chambray. Beard stumptown, cardigans banh mi lomo thundercats. Tofu biodiesel williamsburg marfa, four loko mcsweeney's cleanse vegan chambray. A really ironic artisan whatever keytar, scenester farm-to-table banksy Austin twitter handle freegan cred raw denim single-origin coffee viral. +

    +
    + +

    Using bootstrap-tooltip.js

    +

    Trigger the tooltip via javascript:

    +
    $('#example').tooltip(options)
    +

    Options

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Nametypedefaultdescription
    animationbooleantrueapply a css fade transition to the tooltip
    htmlbooleantrueInsert html into the tooltip. 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'top'how to position the tooltip - top | bottom | left | right
    selectorstringfalseIf a selector is provided, tooltip objects will be delegated to the specified targets.
    titlestring | function''default title value if `title` tag isn't present
    triggerstring'hover'how tooltip is triggered - hover | focus | manual
    delaynumber | object0 +

    delay showing and hiding the tooltip (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 tooltips can alternatively be specified through the use of data attributes. +
    +

    Markup

    +

    For performance reasons, the Tooltip and Popover data-apis are opt in. If you would like to use them just specify a selector option.

     <a href="#" rel="tooltip" title="first tooltip">hover over me</a>
     
    -

    Methods

    -

    $().tooltip(options)

    -

    Attaches a tooltip handler to an element collection.

    -

    .tooltip('show')

    -

    Reveals an element's tooltip.

    -
    $('#element').tooltip('show')
    -

    .tooltip('hide')

    -

    Hides an element's tooltip.

    -
    $('#element').tooltip('hide')
    -

    .tooltip('toggle')

    -

    Toggles an element's tooltip.

    -
    $('#element').tooltip('toggle')
    -
    -
    -
    +

    Methods

    +

    $().tooltip(options)

    +

    Attaches a tooltip handler to an element collection.

    +

    .tooltip('show')

    +

    Reveals an element's tooltip.

    +
    $('#element').tooltip('show')
    +

    .tooltip('hide')

    +

    Hides an element's tooltip.

    +
    $('#element').tooltip('hide')
    +

    .tooltip('toggle')

    +

    Toggles an element's tooltip.

    +
    $('#element').tooltip('toggle')
    + - -
    - -
    -
    -

    About popovers

    -

    Add small overlays of content, like those on the iPad, to any element for housing secondary information.

    -

    * Requires Tooltip to be included

    - Download file -
    -
    -

    Example hover popover

    -

    Hover over the button to trigger the popover.

    - -
    -

    Using bootstrap-popover.js

    -

    Enable popovers via javascript:

    -
    $('#example').popover(options)
    -

    Options

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Nametypedefaultdescription
    animationbooleantrueapply a css fade transition to the tooltip
    htmlbooleantrueInsert 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'hover'how tooltip is triggered - 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. -
    -

    Markup

    -

    - For performance reasons, the Tooltip and Popover data-apis are opt in. If you would like to use them just specify a selector option. -

    -

    Methods

    -

    $().popover(options)

    -

    Initializes popovers for an element collection.

    -

    .popover('show')

    -

    Reveals an elements popover.

    -
    $('#element').popover('show')
    -

    .popover('hide')

    -

    Hides an elements popover.

    -
    $('#element').popover('hide')
    -

    .popover('toggle')

    -

    Toggles an elements popover.

    -
    $('#element').popover('toggle')
    -
    -
    -
    + +
    + +

    About popovers

    +

    Add small overlays of content, like those on the iPad, to any element for housing secondary information.

    +

    * Requires Tooltip to be included

    + Download file - -
    - -
    -
    -

    About alerts

    -

    The alert plugin is a tiny class for adding close functionality to alerts.

    - Download -
    -
    -

    Example alerts

    -

    The alerts plugin works on regular alert messages, and block messages.

    -
    - - Holy guacamole! Best check yo self, you're not looking too good. -
    -
    - -

    Oh snap! You got an error!

    -

    Change this and that and try again. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum.

    -

    - Take this action Or do this -

    -
    -
    -

    Using bootstrap-alert.js

    -

    Enable dismissal of an alert via javascript:

    -
    $(".alert").alert()
    -

    Markup

    -

    Just add data-dismiss="alert" to your close button to automatically give an alert close functionality.

    -
    <a class="close" data-dismiss="alert" href="#">&times;</a>
    -

    Methods

    -

    $().alert()

    -

    Wraps all alerts with close functionality. To have your alerts animate out when closed, make sure they have the .fade and .in class already applied to them.

    -

    .alert('close')

    -

    Closes an alert.

    -
    $(".alert").alert('close')
    -

    Events

    -

    Bootstrap's alert class exposes a few events for hooking into alert functionality.

    - - - - - - - - - - - - - - - - - -
    EventDescription
    closeThis event fires immediately when the close instance method is called.
    closedThis event is fired when the alert has been closed (will wait for css transitions to complete).
    +

    Example hover popover

    +

    Hover over the button to trigger the popover.

    + + +

    Using bootstrap-popover.js

    +

    Enable popovers via javascript:

    +
    $('#example').popover(options)
    +

    Options

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Nametypedefaultdescription
    animationbooleantrueapply a css fade transition to the tooltip
    htmlbooleantrueInsert 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'hover'how tooltip is triggered - 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. +
    +

    Markup

    +

    + For performance reasons, the Tooltip and Popover data-apis are opt in. If you would like to use them just specify a selector option. +

    +

    Methods

    +

    $().popover(options)

    +

    Initializes popovers for an element collection.

    +

    .popover('show')

    +

    Reveals an elements popover.

    +
    $('#element').popover('show')
    +

    .popover('hide')

    +

    Hides an elements popover.

    +
    $('#element').popover('hide')
    +

    .popover('toggle')

    +

    Toggles an elements popover.

    +
    $('#element').popover('toggle')
    +
    + + + + +
    + + +

    About alerts

    +

    The alert plugin is a tiny class for adding close functionality to alerts.

    + Download + +

    Example alerts

    +

    The alerts plugin works on regular alert messages, and block messages.

    +
    +
    + + Holy guacamole! Best check yo self, you're not looking too good. +
    +
    + +
    +
    + +

    Oh snap! You got an error!

    +

    Change this and that and try again. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum.

    +

    + Take this action Or do this +

    +
    +
    + +

    Using bootstrap-alert.js

    +

    Enable dismissal of an alert via javascript:

    +
    $(".alert").alert()
    +

    Markup

    +

    Just add data-dismiss="alert" to your close button to automatically give an alert close functionality.

    +
    <a class="close" data-dismiss="alert" href="#">&times;</a>
    +

    Methods

    +

    $().alert()

    +

    Wraps all alerts with close functionality. To have your alerts animate out when closed, make sure they have the .fade and .in class already applied to them.

    +

    .alert('close')

    +

    Closes an alert.

    +
    $(".alert").alert('close')
    +

    Events

    +

    Bootstrap's alert class exposes a few events for hooking into alert functionality.

    + + + + + + + + + + + + + + + + + +
    EventDescription
    closeThis event fires immediately when the close instance method is called.
    closedThis event is fired when the alert has been closed (will wait for css transitions to complete).
     $('#my-alert').bind('closed', function () {
       // do something…
     })
    -
    - - + - -
    - -
    -
    -

    About

    -

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

    - Download file -
    -
    -

    Example uses

    -

    Use the buttons plugin for states and toggles.

    - - - - - - - - - - - - - - - - - - - -
    Stateful - -
    Single toggle - -
    Checkbox -
    - - - -
    -
    Radio -
    - - - -
    -
    -
    -

    Using bootstrap-button.js

    -

    Enable buttons via javascript:

    -
    $('.nav-tabs').button()
    -

    Markup

    -

    Data attributes are integral to the button plugin. Check out the example code below for the various markup types.

    + +
    + + +

    About

    +

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

    + Download file + +

    Example uses

    +

    Use the buttons plugin for states and toggles.

    + +

    Stateful

    +
    + +
    + +

    Single toggle

    +
    + +
    + +

    Checkbox

    +
    +
    + + + +
    +
    + +

    Radio

    +
    +
    + + + +
    +
    + +

    Using bootstrap-button.js

    +

    Enable buttons via javascript:

    +
    $('.nav-tabs').button()
    +

    Markup

    +

    Data attributes are integral to the button plugin. Check out the example code below for the various markup types.

     <!-- Add data-toggle="button" to activate toggling on a single button -->
     <button class="btn" data-toggle="button">Single Toggle</button>
    @@ -1108,267 +1176,262 @@ $('#my-alert').bind('closed', function () {
       <button class="btn">Right</button>
     </div>
     
    -

    Methods

    -

    $().button('toggle')

    -

    Toggles push state. Gives the button the appearance that it has been activated.

    -
    - Heads up! - You can enable auto toggling of a button by using the data-toggle attribute. -
    -
    <button class="btn" data-toggle="button" >…</button>
    -

    $().button('loading')

    -

    Sets button state to loading - disables button and swaps text to loading text. Loading text should be defined on the button element using the data attribute data-loading-text. -

    -
    <button class="btn" data-loading-text="loading stuff..." >...</button>
    -
    - Heads up! - Firefox persists the disabled state across page loads. A workaround for this is to use autocomplete="off". -
    -

    $().button('reset')

    -

    Resets button state - swaps text to original text.

    -

    $().button(string)

    -

    Resets button state - swaps text to any data defined text state.

    +

    Methods

    +

    $().button('toggle')

    +

    Toggles push state. Gives the button the appearance that it has been activated.

    +
    + Heads up! + You can enable auto toggling of a button by using the data-toggle attribute. +
    +
    <button class="btn" data-toggle="button" >…</button>
    +

    $().button('loading')

    +

    Sets button state to loading - disables button and swaps text to loading text. Loading text should be defined on the button element using the data attribute data-loading-text. +

    +
    <button class="btn" data-loading-text="loading stuff..." >...</button>
    +
    + Heads up! + Firefox persists the disabled state across page loads. A workaround for this is to use autocomplete="off". +
    +

    $().button('reset')

    +

    Resets button state - swaps text to original text.

    +

    $().button(string)

    +

    Resets button state - swaps text to any data defined text state.

    <button class="btn" data-complete-text="finished!" >...</button>
     <script>
       $('.btn').button('complete')
     </script>
    -
    -
    -
    + - -
    -
    - - - -
    - -
    -
    -

    About

    -

    A basic, easily extended plugin for quickly creating elegant typeaheads with any form text input.

    - Download file -
    -
    -

    Example

    -

    Start typing in the field below to show the typeahead results.

    -
    - -
    -
    -

    Using bootstrap-typeahead.js

    -

    Call the typeahead via javascript:

    -
    $('.typeahead').typeahead()
    -

    Options

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Nametypedefaultdescription
    sourcearray, function[ ]The data source to query against. May be an array of strings or a function. The function is passed two arguments, the query value in the input field and the process callback. The function may be used synchronously by returning the data source directly or asynchronously via the process callback's single argument.
    itemsnumber8The max number of items to display in the dropdown.
    matcherfunctioncase insensitiveThe method used to determine if a query matches an item. Accepts a single argument, the item against which to test the query. Access the current query with this.query. Return a boolean true if query is a match.
    sorterfunctionexact match,
    case sensitive,
    case insensitive
    Method used to sort autocomplete results. Accepts a single argument items and has the scope of the typeahead instance. Reference the current query with this.query.
    highlighterfunctionhighlights all default matchesMethod used to highlight autocomplete results. Accepts a single argument item and has the scope of the typeahead instance. Should return html.
    - -

    Markup

    -

    Add data attributes to register an element with typeahead functionality.

    + +
    + + +

    About

    +

    A basic, easily extended plugin for quickly creating elegant typeaheads with any form text input.

    + Download file + +

    Example

    +

    Start typing in the field below to show the typeahead results.

    +
    + +
    + +

    Using bootstrap-typeahead.js

    +

    Call the typeahead via javascript:

    +
    $('.typeahead').typeahead()
    +

    Options

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Nametypedefaultdescription
    sourcearray, function[ ]The data source to query against. May be an array of strings or a function. The function is passed two arguments, the query value in the input field and the process callback. The function may be used synchronously by returning the data source directly or asynchronously via the process callback's single argument.
    itemsnumber8The max number of items to display in the dropdown.
    matcherfunctioncase insensitiveThe method used to determine if a query matches an item. Accepts a single argument, the item against which to test the query. Access the current query with this.query. Return a boolean true if query is a match.
    sorterfunctionexact match,
    case sensitive,
    case insensitive
    Method used to sort autocomplete results. Accepts a single argument items and has the scope of the typeahead instance. Reference the current query with this.query.
    highlighterfunctionhighlights all default matchesMethod used to highlight autocomplete results. Accepts a single argument item and has the scope of the typeahead instance. Should return html.
    + +

    Markup

    +

    Add data attributes to register an element with typeahead functionality.

     <input type="text" data-provide="typeahead">
     
    -

    Methods

    -

    .typeahead(options)

    -

    Initializes an input with a typeahead.

    -
    -
    -
    +

    Methods

    +

    .typeahead(options)

    +

    Initializes an input with a typeahead.

    + +
  • + Scaffolding + +
  • +
  • + Base CSS + +
  • +
  • + Components + +
  • +
  • + Javascript + +
  • +
  • + LESS + +
  • +
  • + Customize +
  • +
  • + Examples +
  • + + +
    -
    -

    Scaffolding

    -

    Bootstrap is built on a responsive 12-column grid. We've also included fixed- and fluid-width layouts based on that system.

    - -
    - - -
    -

    Contents

    -
      -
    1. - Global styles + + +
      + + +
      +

      Scaffolding

      +

      Bootstrap is built on a responsive 12-column grid. We've also included fixed- and fluid-width layouts based on that system.

      +
      + + +
      +

      Contents

      +
        +
      1. Global styles
      2. +
      3. Grid system
      4. +
      5. Fluid grid system
      6. +
      7. Customizing
      8. +
      9. Layouts
      10. +
      11. Responsive design
      diff --git a/docs/templates/layout.mustache b/docs/templates/layout.mustache index 4149f8e286..b74f59f897 100644 --- a/docs/templates/layout.mustache +++ b/docs/templates/layout.mustache @@ -85,6 +85,7 @@
    +
    -
    {{>body}} @@ -184,7 +184,6 @@
    -
    diff --git a/docs/templates/pages/base-css.mustache b/docs/templates/pages/base-css.mustache index ce710d7e33..8b1e7c0c50 100644 --- a/docs/templates/pages/base-css.mustache +++ b/docs/templates/pages/base-css.mustache @@ -3,17 +3,7 @@

    {{_i}}Base CSS{{/i}}

    {{_i}}On top of the scaffolding, basic HTML elements are styled and enhanced with extensible classes to provide a fresh, consistent look and feel.{{/i}}

    -
    +
    diff --git a/docs/templates/pages/components.mustache b/docs/templates/pages/components.mustache index ad452fe9c3..6430572549 100644 --- a/docs/templates/pages/components.mustache +++ b/docs/templates/pages/components.mustache @@ -3,24 +3,20 @@

    {{_i}}Components{{/i}}

    {{_i}}Dozens of reusable components are built into Bootstrap to provide navigation, alerts, popovers, and much more.{{/i}}

    -
    + + + +
    + - +
    diff --git a/docs/templates/pages/download.mustache b/docs/templates/pages/download.mustache index d9d038df28..03fbe3775c 100644 --- a/docs/templates/pages/download.mustache +++ b/docs/templates/pages/download.mustache @@ -3,16 +3,22 @@

    {{_i}}Customize and download{{/i}}

    {{_i}}Download the full repository or customize your entire Bootstrap build by selecting only the components, javascript plugins, and assets you need.{{/i}}

    -
    + + +
    + +
    +
    - -
    - -
    -
    -

    {{_i}}The ScrollSpy plugin is for automatically updating nav targets based on scroll position.{{/i}}

    - {{_i}}Download file{{/i}} + +
    + + +

    {{_i}}The ScrollSpy plugin is for automatically updating nav targets based on scroll position.{{/i}}

    + {{_i}}Download file{{/i}} + +

    {{_i}}Example navbar with scrollspy{{/i}}

    +

    {{_i}}Scroll the area below and watch the navigation update. The dropdown sub items will be highlighted as well. Try it!{{/i}}

    +
    + {{! /example }} + +
    +

    {{_i}}Using bootstrap-scrollspy.js{{/i}}

    +

    {{_i}}Call the scrollspy via javascript:{{/i}}

    +
    $('#navbar').scrollspy()
    +

    {{_i}}Markup{{/i}}

    +

    {{_i}}To easily add scrollspy behavior to your topbar navigation, just add data-spy="scroll" to the element you want to spy on (most typically this would be the body).{{/i}}

    +
    <body data-spy="scroll" >...</body>
    +
    + {{_i}}Heads up!{{/i}} + {{_i}}Navbar links must have resolvable id targets. For example, a <a href="#home">home</a> must correspond to something in the dom like <div id="home"></div>.{{/i}} +
    +

    {{_i}}Methods{{/i}}

    +

    .scrollspy('refresh')

    +

    {{_i}}When using scrollspy in conjunction with adding or removing of elements from the DOM, you'll need to call the refresh method like so:{{/i}}

     $('[data-spy="scroll"]').each(function () {
       var $spy = $(this).scrollspy('refresh')
     });
     
    -

    {{_i}}Options{{/i}}

    - - - - - - - - - - - - - - - - - -
    {{_i}}Name{{/i}}{{_i}}type{{/i}}{{_i}}default{{/i}}{{_i}}description{{/i}}
    {{_i}}offset{{/i}}{{_i}}number{{/i}}{{_i}}10{{/i}}{{_i}}Pixels to offset from top when calculating position of scroll.{{/i}}
    -

    {{_i}}Events{{/i}}

    - - - - - - - - - - - - - -
    {{_i}}Event{{/i}}{{_i}}Description{{/i}}
    {{_i}}activate{{/i}}{{_i}}This event fires whenever a new item becomes activated by the scrollspy.{{/i}}
    -
    -
    -
    +

    {{_i}}Options{{/i}}

    + + + + + + + + + + + + + + + + + +
    {{_i}}Name{{/i}}{{_i}}type{{/i}}{{_i}}default{{/i}}{{_i}}description{{/i}}
    {{_i}}offset{{/i}}{{_i}}number{{/i}}{{_i}}10{{/i}}{{_i}}Pixels to offset from top when calculating position of scroll.{{/i}}
    +

    {{_i}}Events{{/i}}

    + + + + + + + + + + + + + +
    {{_i}}Event{{/i}}{{_i}}Description{{/i}}
    {{_i}}activate{{/i}}{{_i}}This event fires whenever a new item becomes activated by the scrollspy.{{/i}}
    +
    + + +
    + - -
    -
    +
    - -
    - -
    -
    -

    {{_i}}About Tooltips{{/i}}

    -

    {{_i}}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.{{/i}}

    - {{_i}}Download file{{/i}} -
    -
    -

    {{_i}}Example use of Tooltips{{/i}}

    -

    {{_i}}Hover over the links below to see tooltips:{{/i}}

    -
    -

    {{_i}}Tight pants next level keffiyeh you probably haven't heard of them. Photo booth beard raw denim letterpress vegan messenger bag stumptown. Farm-to-table seitan, mcsweeney's fixie sustainable quinoa 8-bit american apparel have a terry richardson vinyl chambray. Beard stumptown, cardigans banh mi lomo thundercats. Tofu biodiesel williamsburg marfa, four loko mcsweeney's cleanse vegan chambray. A really ironic artisan whatever keytar, scenester farm-to-table banksy Austin twitter handle freegan cred raw denim single-origin coffee viral.{{/i}} -

    -
    -
    -

    {{_i}}Using{{/i}} bootstrap-tooltip.js

    -

    {{_i}}Trigger the tooltip via javascript:{{/i}}

    -
    $('#example').tooltip({{_i}}options{{/i}})
    -

    {{_i}}Options{{/i}}

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    {{_i}}Name{{/i}}{{_i}}type{{/i}}{{_i}}default{{/i}}{{_i}}description{{/i}}
    {{_i}}animation{{/i}}{{_i}}boolean{{/i}}true{{_i}}apply a css fade transition to the tooltip{{/i}}
    {{_i}}html{{/i}}{{_i}}boolean{{/i}}true{{_i}}Insert html into the tooltip. If false, jquery's text method will be used to insert content into the dom. Use text if you're worried about XSS attacks.{{/i}}
    {{_i}}placement{{/i}}{{_i}}string|function{{/i}}'top'{{_i}}how to position the tooltip{{/i}} - top | bottom | left | right
    {{_i}}selector{{/i}}{{_i}}string{{/i}}false{{_i}}If a selector is provided, tooltip objects will be delegated to the specified targets.{{/i}}
    {{_i}}title{{/i}}{{_i}}string | function{{/i}}''{{_i}}default title value if `title` tag isn't present{{/i}}
    {{_i}}trigger{{/i}}{{_i}}string{{/i}}'hover'{{_i}}how tooltip is triggered{{/i}} - hover | focus | manual
    {{_i}}delay{{/i}}{{_i}}number | object{{/i}}0 -

    {{_i}}delay showing and hiding the tooltip (ms) - does not apply to manual trigger type{{/i}}

    -

    {{_i}}If a number is supplied, delay is applied to both hide/show{{/i}}

    -

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

    -
    -
    - {{_i}}Heads up!{{/i}} - {{_i}}Options for individual tooltips can alternatively be specified through the use of data attributes.{{/i}} -
    -

    {{_i}}Markup{{/i}}

    -

    {{_i}}For performance reasons, the Tooltip and Popover data-apis are opt in. If you would like to use them just specify a selector option.{{/i}}

    + +
    + + +

    {{_i}}About Tooltips{{/i}}

    +

    {{_i}}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.{{/i}}

    + {{_i}}Download file{{/i}} + +

    {{_i}}Example use of Tooltips{{/i}}

    +

    {{_i}}Hover over the links below to see tooltips:{{/i}}

    +
    +

    {{_i}}Tight pants next level keffiyeh you probably haven't heard of them. Photo booth beard raw denim letterpress vegan messenger bag stumptown. Farm-to-table seitan, mcsweeney's fixie sustainable quinoa 8-bit american apparel have a terry richardson vinyl chambray. Beard stumptown, cardigans banh mi lomo thundercats. Tofu biodiesel williamsburg marfa, four loko mcsweeney's cleanse vegan chambray. A really ironic artisan whatever keytar, scenester farm-to-table banksy Austin twitter handle freegan cred raw denim single-origin coffee viral.{{/i}} +

    +
    {{! /example }} + +

    {{_i}}Using{{/i}} bootstrap-tooltip.js

    +

    {{_i}}Trigger the tooltip via javascript:{{/i}}

    +
    $('#example').tooltip({{_i}}options{{/i}})
    +

    {{_i}}Options{{/i}}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    {{_i}}Name{{/i}}{{_i}}type{{/i}}{{_i}}default{{/i}}{{_i}}description{{/i}}
    {{_i}}animation{{/i}}{{_i}}boolean{{/i}}true{{_i}}apply a css fade transition to the tooltip{{/i}}
    {{_i}}html{{/i}}{{_i}}boolean{{/i}}true{{_i}}Insert html into the tooltip. If false, jquery's text method will be used to insert content into the dom. Use text if you're worried about XSS attacks.{{/i}}
    {{_i}}placement{{/i}}{{_i}}string|function{{/i}}'top'{{_i}}how to position the tooltip{{/i}} - top | bottom | left | right
    {{_i}}selector{{/i}}{{_i}}string{{/i}}false{{_i}}If a selector is provided, tooltip objects will be delegated to the specified targets.{{/i}}
    {{_i}}title{{/i}}{{_i}}string | function{{/i}}''{{_i}}default title value if `title` tag isn't present{{/i}}
    {{_i}}trigger{{/i}}{{_i}}string{{/i}}'hover'{{_i}}how tooltip is triggered{{/i}} - hover | focus | manual
    {{_i}}delay{{/i}}{{_i}}number | object{{/i}}0 +

    {{_i}}delay showing and hiding the tooltip (ms) - does not apply to manual trigger type{{/i}}

    +

    {{_i}}If a number is supplied, delay is applied to both hide/show{{/i}}

    +

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

    +
    +
    + {{_i}}Heads up!{{/i}} + {{_i}}Options for individual tooltips can alternatively be specified through the use of data attributes.{{/i}} +
    +

    {{_i}}Markup{{/i}}

    +

    {{_i}}For performance reasons, the Tooltip and Popover data-apis are opt in. If you would like to use them just specify a selector option.{{/i}}

     <a href="#" rel="tooltip" title="{{_i}}first tooltip{{/i}}">{{_i}}hover over me{{/i}}</a>
     
    -

    {{_i}}Methods{{/i}}

    -

    $().tooltip({{_i}}options{{/i}})

    -

    {{_i}}Attaches a tooltip handler to an element collection.{{/i}}

    -

    .tooltip('show')

    -

    {{_i}}Reveals an element's tooltip.{{/i}}

    -
    $('#element').tooltip('show')
    -

    .tooltip('hide')

    -

    {{_i}}Hides an element's tooltip.{{/i}}

    -
    $('#element').tooltip('hide')
    -

    .tooltip('toggle')

    -

    {{_i}}Toggles an element's tooltip.{{/i}}

    -
    $('#element').tooltip('toggle')
    -
    -
    -
    + +

    {{_i}}Methods{{/i}}

    +

    $().tooltip({{_i}}options{{/i}})

    +

    {{_i}}Attaches a tooltip handler to an element collection.{{/i}}

    +

    .tooltip('show')

    +

    {{_i}}Reveals an element's tooltip.{{/i}}

    +
    $('#element').tooltip('show')
    +

    .tooltip('hide')

    +

    {{_i}}Hides an element's tooltip.{{/i}}

    +
    $('#element').tooltip('hide')
    +

    .tooltip('toggle')

    +

    {{_i}}Toggles an element's tooltip.{{/i}}

    +
    $('#element').tooltip('toggle')
    + - -
    - -
    -
    -

    {{_i}}About popovers{{/i}}

    -

    {{_i}}Add small overlays of content, like those on the iPad, to any element for housing secondary information.{{/i}}

    -

    * {{_i}}Requires Tooltip to be included{{/i}}

    - {{_i}}Download file{{/i}} -
    -
    -

    {{_i}}Example hover popover{{/i}}

    -

    {{_i}}Hover over the button to trigger the popover.{{/i}}

    - -
    -

    {{_i}}Using bootstrap-popover.js{{/i}}

    -

    {{_i}}Enable popovers via javascript:{{/i}}

    -
    $('#example').popover({{_i}}options{{/i}})
    -

    {{_i}}Options{{/i}}

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    {{_i}}Name{{/i}}{{_i}}type{{/i}}{{_i}}default{{/i}}{{_i}}description{{/i}}
    {{_i}}animation{{/i}}{{_i}}boolean{{/i}}true{{_i}}apply a css fade transition to the tooltip{{/i}}
    {{_i}}html{{/i}}{{_i}}boolean{{/i}}true{{_i}}Insert 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.{{/i}}
    {{_i}}placement{{/i}}{{_i}}string|function{{/i}}'right'{{_i}}how to position the popover{{/i}} - top | bottom | left | right
    {{_i}}selector{{/i}}{{_i}}string{{/i}}false{{_i}}if a selector is provided, tooltip objects will be delegated to the specified targets{{/i}}
    {{_i}}trigger{{/i}}{{_i}}string{{/i}}'hover'{{_i}}how tooltip is triggered{{/i}} - hover | focus | manual
    {{_i}}title{{/i}}{{_i}}string | function{{/i}}''{{_i}}default title value if `title` attribute isn't present{{/i}}
    {{_i}}content{{/i}}{{_i}}string | function{{/i}}''{{_i}}default content value if `data-content` attribute isn't present{{/i}}
    {{_i}}delay{{/i}}{{_i}}number | object{{/i}}0 -

    {{_i}}delay showing and hiding the popover (ms) - does not apply to manual trigger type{{/i}}

    -

    {{_i}}If a number is supplied, delay is applied to both hide/show{{/i}}

    -

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

    -
    -
    - {{_i}}Heads up!{{/i}} - {{_i}}Options for individual popovers can alternatively be specified through the use of data attributes.{{/i}} -
    -

    {{_i}}Markup{{/i}}

    -

    - {{_i}}For performance reasons, the Tooltip and Popover data-apis are opt in. If you would like to use them just specify a selector option.{{/i}} -

    -

    {{_i}}Methods{{/i}}

    -

    $().popover({{_i}}options{{/i}})

    -

    {{_i}}Initializes popovers for an element collection.{{/i}}

    -

    .popover('show')

    -

    {{_i}}Reveals an elements popover.{{/i}}

    -
    $('#element').popover('show')
    -

    .popover('hide')

    -

    {{_i}}Hides an elements popover.{{/i}}

    -
    $('#element').popover('hide')
    -

    .popover('toggle')

    -

    {{_i}}Toggles an elements popover.{{/i}}

    -
    $('#element').popover('toggle')
    -
    -
    -
    + +
    + +

    {{_i}}About popovers{{/i}}

    +

    {{_i}}Add small overlays of content, like those on the iPad, to any element for housing secondary information.{{/i}}

    +

    * {{_i}}Requires Tooltip to be included{{/i}}

    + {{_i}}Download file{{/i}} +

    {{_i}}Example hover popover{{/i}}

    +

    {{_i}}Hover over the button to trigger the popover.{{/i}}

    + - -
    - -
    -
    -

    {{_i}}About alerts{{/i}}

    -

    {{_i}}The alert plugin is a tiny class for adding close functionality to alerts.{{/i}}

    - {{_i}}Download{{/i}} -
    -
    -

    {{_i}}Example alerts{{/i}}

    -

    {{_i}}The alerts plugin works on regular alert messages, and block messages.{{/i}}

    -
    - - {{_i}}Holy guacamole!{{/i}} {{_i}}Best check yo self, you're not looking too good.{{/i}} -
    -
    - -

    {{_i}}Oh snap! You got an error!{{/i}}

    -

    {{_i}}Change this and that and try again. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum.{{/i}}

    -

    - {{_i}}Take this action{{/i}} {{_i}}Or do this{{/i}} -

    -
    -
    -

    {{_i}}Using bootstrap-alert.js{{/i}}

    -

    {{_i}}Enable dismissal of an alert via javascript:{{/i}}

    -
    $(".alert").alert()
    -

    {{_i}}Markup{{/i}}

    -

    {{_i}}Just add data-dismiss="alert" to your close button to automatically give an alert close functionality.{{/i}}

    -
    <a class="close" data-dismiss="alert" href="#">&times;</a>
    -

    {{_i}}Methods{{/i}}

    -

    $().alert()

    -

    {{_i}}Wraps all alerts with close functionality. To have your alerts animate out when closed, make sure they have the .fade and .in class already applied to them.{{/i}}

    -

    .alert('close')

    -

    {{_i}}Closes an alert.{{/i}}

    -
    $(".alert").alert('close')
    -

    {{_i}}Events{{/i}}

    -

    {{_i}}Bootstrap's alert class exposes a few events for hooking into alert functionality.{{/i}}

    - - - - - - - - - - - - - - - - - -
    {{_i}}Event{{/i}}{{_i}}Description{{/i}}
    {{_i}}close{{/i}}{{_i}}This event fires immediately when the close instance method is called.{{/i}}
    {{_i}}closed{{/i}}{{_i}}This event is fired when the alert has been closed (will wait for css transitions to complete).{{/i}}
    +

    {{_i}}Using bootstrap-popover.js{{/i}}

    +

    {{_i}}Enable popovers via javascript:{{/i}}

    +
    $('#example').popover({{_i}}options{{/i}})
    +

    {{_i}}Options{{/i}}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    {{_i}}Name{{/i}}{{_i}}type{{/i}}{{_i}}default{{/i}}{{_i}}description{{/i}}
    {{_i}}animation{{/i}}{{_i}}boolean{{/i}}true{{_i}}apply a css fade transition to the tooltip{{/i}}
    {{_i}}html{{/i}}{{_i}}boolean{{/i}}true{{_i}}Insert 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.{{/i}}
    {{_i}}placement{{/i}}{{_i}}string|function{{/i}}'right'{{_i}}how to position the popover{{/i}} - top | bottom | left | right
    {{_i}}selector{{/i}}{{_i}}string{{/i}}false{{_i}}if a selector is provided, tooltip objects will be delegated to the specified targets{{/i}}
    {{_i}}trigger{{/i}}{{_i}}string{{/i}}'hover'{{_i}}how tooltip is triggered{{/i}} - hover | focus | manual
    {{_i}}title{{/i}}{{_i}}string | function{{/i}}''{{_i}}default title value if `title` attribute isn't present{{/i}}
    {{_i}}content{{/i}}{{_i}}string | function{{/i}}''{{_i}}default content value if `data-content` attribute isn't present{{/i}}
    {{_i}}delay{{/i}}{{_i}}number | object{{/i}}0 +

    {{_i}}delay showing and hiding the popover (ms) - does not apply to manual trigger type{{/i}}

    +

    {{_i}}If a number is supplied, delay is applied to both hide/show{{/i}}

    +

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

    +
    +
    + {{_i}}Heads up!{{/i}} + {{_i}}Options for individual popovers can alternatively be specified through the use of data attributes.{{/i}} +
    +

    {{_i}}Markup{{/i}}

    +

    + {{_i}}For performance reasons, the Tooltip and Popover data-apis are opt in. If you would like to use them just specify a selector option.{{/i}} +

    +

    {{_i}}Methods{{/i}}

    +

    $().popover({{_i}}options{{/i}})

    +

    {{_i}}Initializes popovers for an element collection.{{/i}}

    +

    .popover('show')

    +

    {{_i}}Reveals an elements popover.{{/i}}

    +
    $('#element').popover('show')
    +

    .popover('hide')

    +

    {{_i}}Hides an elements popover.{{/i}}

    +
    $('#element').popover('hide')
    +

    .popover('toggle')

    +

    {{_i}}Toggles an elements popover.{{/i}}

    +
    $('#element').popover('toggle')
    +
    + + + + +
    + + +

    {{_i}}About alerts{{/i}}

    +

    {{_i}}The alert plugin is a tiny class for adding close functionality to alerts.{{/i}}

    + {{_i}}Download{{/i}} + +

    {{_i}}Example alerts{{/i}}

    +

    {{_i}}The alerts plugin works on regular alert messages, and block messages.{{/i}}

    +
    +
    + + {{_i}}Holy guacamole!{{/i}} {{_i}}Best check yo self, you're not looking too good.{{/i}} +
    +
    {{! /example }} + +
    +
    + +

    {{_i}}Oh snap! You got an error!{{/i}}

    +

    {{_i}}Change this and that and try again. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum.{{/i}}

    +

    + {{_i}}Take this action{{/i}} {{_i}}Or do this{{/i}} +

    +
    +
    {{! /example }} + +

    {{_i}}Using bootstrap-alert.js{{/i}}

    +

    {{_i}}Enable dismissal of an alert via javascript:{{/i}}

    +
    $(".alert").alert()
    +

    {{_i}}Markup{{/i}}

    +

    {{_i}}Just add data-dismiss="alert" to your close button to automatically give an alert close functionality.{{/i}}

    +
    <a class="close" data-dismiss="alert" href="#">&times;</a>
    +

    {{_i}}Methods{{/i}}

    +

    $().alert()

    +

    {{_i}}Wraps all alerts with close functionality. To have your alerts animate out when closed, make sure they have the .fade and .in class already applied to them.{{/i}}

    +

    .alert('close')

    +

    {{_i}}Closes an alert.{{/i}}

    +
    $(".alert").alert('close')
    +

    {{_i}}Events{{/i}}

    +

    {{_i}}Bootstrap's alert class exposes a few events for hooking into alert functionality.{{/i}}

    + + + + + + + + + + + + + + + + + +
    {{_i}}Event{{/i}}{{_i}}Description{{/i}}
    {{_i}}close{{/i}}{{_i}}This event fires immediately when the close instance method is called.{{/i}}
    {{_i}}closed{{/i}}{{_i}}This event is fired when the alert has been closed (will wait for css transitions to complete).{{/i}}
     $('#my-alert').bind('closed', function () {
       // {{_i}}do something…{{/i}}
     })
    - - -
    +
    - -
    - -
    -
    -

    {{_i}}About{{/i}}

    -

    {{_i}}Do more with buttons. Control button states or create groups of buttons for more components like toolbars.{{/i}}

    - {{_i}}Download file{{/i}} -
    -
    -

    {{_i}}Example uses{{/i}}

    -

    {{_i}}Use the buttons plugin for states and toggles.{{/i}}

    - - - - - - - - - - - - - - - - - - - -
    {{_i}}Stateful{{/i}} - -
    {{_i}}Single toggle{{/i}} - -
    {{_i}}Checkbox{{/i}} -
    - - - -
    -
    {{_i}}Radio{{/i}} -
    - - - -
    -
    -
    -

    {{_i}}Using bootstrap-button.js{{/i}}

    -

    {{_i}}Enable buttons via javascript:{{/i}}

    -
    $('.nav-tabs').button()
    -

    {{_i}}Markup{{/i}}

    -

    {{_i}}Data attributes are integral to the button plugin. Check out the example code below for the various markup types.{{/i}}

    + +
    + + +

    {{_i}}About{{/i}}

    +

    {{_i}}Do more with buttons. Control button states or create groups of buttons for more components like toolbars.{{/i}}

    + {{_i}}Download file{{/i}} + +

    {{_i}}Example uses{{/i}}

    +

    {{_i}}Use the buttons plugin for states and toggles.{{/i}}

    + +

    {{_i}}Stateful{{/i}}

    +
    + +
    {{! /example }} + +

    {{_i}}Single toggle{{/i}}

    +
    + +
    {{! /example }} + +

    {{_i}}Checkbox{{/i}}

    +
    +
    + + + +
    +
    {{! /example }} + +

    {{_i}}Radio{{/i}}

    +
    +
    + + + +
    +
    {{! /example }} + +

    {{_i}}Using bootstrap-button.js{{/i}}

    +

    {{_i}}Enable buttons via javascript:{{/i}}

    +
    $('.nav-tabs').button()
    +

    {{_i}}Markup{{/i}}

    +

    {{_i}}Data attributes are integral to the button plugin. Check out the example code below for the various markup types.{{/i}}

     <!-- {{_i}}Add data-toggle="button" to activate toggling on a single button{{/i}} -->
     <button class="btn" data-toggle="button">Single Toggle</button>
    @@ -1030,267 +1015,262 @@ $('#my-alert').bind('closed', function () {
       <button class="btn">Right</button>
     </div>
     
    -

    {{_i}}Methods{{/i}}

    -

    $().button('toggle')

    -

    {{_i}}Toggles push state. Gives the button the appearance that it has been activated.{{/i}}

    -
    - {{_i}}Heads up!{{/i}} - {{_i}}You can enable auto toggling of a button by using the data-toggle attribute.{{/i}} -
    -
    <button class="btn" data-toggle="button" >…</button>
    -

    $().button('loading')

    -

    {{_i}}Sets button state to loading - disables button and swaps text to loading text. Loading text should be defined on the button element using the data attribute data-loading-text.{{/i}} -

    -
    <button class="btn" data-loading-text="loading stuff..." >...</button>
    -
    - {{_i}}Heads up!{{/i}} - {{_i}}Firefox persists the disabled state across page loads. A workaround for this is to use autocomplete="off".{{/i}} -
    -

    $().button('reset')

    -

    {{_i}}Resets button state - swaps text to original text.{{/i}}

    -

    $().button(string)

    -

    {{_i}}Resets button state - swaps text to any data defined text state.{{/i}}

    +

    {{_i}}Methods{{/i}}

    +

    $().button('toggle')

    +

    {{_i}}Toggles push state. Gives the button the appearance that it has been activated.{{/i}}

    +
    + {{_i}}Heads up!{{/i}} + {{_i}}You can enable auto toggling of a button by using the data-toggle attribute.{{/i}} +
    +
    <button class="btn" data-toggle="button" >…</button>
    +

    $().button('loading')

    +

    {{_i}}Sets button state to loading - disables button and swaps text to loading text. Loading text should be defined on the button element using the data attribute data-loading-text.{{/i}} +

    +
    <button class="btn" data-loading-text="loading stuff..." >...</button>
    +
    + {{_i}}Heads up!{{/i}} + {{_i}}Firefox persists the disabled state across page loads. A workaround for this is to use autocomplete="off".{{/i}} +
    +

    $().button('reset')

    +

    {{_i}}Resets button state - swaps text to original text.{{/i}}

    +

    $().button(string)

    +

    {{_i}}Resets button state - swaps text to any data defined text state.{{/i}}

    <button class="btn" data-complete-text="finished!" >...</button>
     <script>
       $('.btn').button('complete')
     </script>
    -
    -
    -
    + + + + + +
    + +

    {{_i}}About{{/i}}

    +

    {{_i}}Get base styles and flexible support for collapsible components like accordions and navigation.{{/i}}

    + {{_i}}Download file{{/i}} +

    * {{_i}}Requires the Transitions plugin to be included.{{/i}}

    +

    {{_i}}Example accordion{{/i}}

    +

    {{_i}}Using the collapse plugin, we built a simple accordion style widget:{{/i}}

    - -
    -
    +
    - - - -
    - -
    -
    -

    {{_i}}About{{/i}}

    -

    {{_i}}A basic, easily extended plugin for quickly creating elegant typeaheads with any form text input.{{/i}}

    - {{_i}}Download file{{/i}} -
    -
    -

    {{_i}}Example{{/i}}

    -

    {{_i}}Start typing in the field below to show the typeahead results.{{/i}}

    -
    - -
    -
    -

    {{_i}}Using bootstrap-typeahead.js{{/i}}

    -

    {{_i}}Call the typeahead via javascript:{{/i}}

    -
    $('.typeahead').typeahead()
    -

    {{_i}}Options{{/i}}

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    {{_i}}Name{{/i}}{{_i}}type{{/i}}{{_i}}default{{/i}}{{_i}}description{{/i}}
    {{_i}}source{{/i}}{{_i}}array, function{{/i}}[ ]{{_i}}The data source to query against. May be an array of strings or a function. The function is passed two arguments, the query value in the input field and the process callback. The function may be used synchronously by returning the data source directly or asynchronously via the process callback's single argument.{{/i}}
    {{_i}}items{{/i}}{{_i}}number{{/i}}8{{_i}}The max number of items to display in the dropdown.{{/i}}
    {{_i}}matcher{{/i}}{{_i}}function{{/i}}{{_i}}case insensitive{{/i}}{{_i}}The method used to determine if a query matches an item. Accepts a single argument, the item against which to test the query. Access the current query with this.query. Return a boolean true if query is a match.{{/i}}
    {{_i}}sorter{{/i}}{{_i}}function{{/i}}{{_i}}exact match,
    case sensitive,
    case insensitive{{/i}}
    {{_i}}Method used to sort autocomplete results. Accepts a single argument items and has the scope of the typeahead instance. Reference the current query with this.query.{{/i}}
    {{_i}}highlighter{{/i}}{{_i}}function{{/i}}{{_i}}highlights all default matches{{/i}}{{_i}}Method used to highlight autocomplete results. Accepts a single argument item and has the scope of the typeahead instance. Should return html.{{/i}}
    - -

    {{_i}}Markup{{/i}}

    -

    {{_i}}Add data attributes to register an element with typeahead functionality.{{/i}}

    + +
    + + +

    {{_i}}About{{/i}}

    +

    {{_i}}A basic, easily extended plugin for quickly creating elegant typeaheads with any form text input.{{/i}}

    + {{_i}}Download file{{/i}} + +

    {{_i}}Example{{/i}}

    +

    {{_i}}Start typing in the field below to show the typeahead results.{{/i}}

    +
    + +
    {{! /example }} + +

    {{_i}}Using bootstrap-typeahead.js{{/i}}

    +

    {{_i}}Call the typeahead via javascript:{{/i}}

    +
    $('.typeahead').typeahead()
    +

    {{_i}}Options{{/i}}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    {{_i}}Name{{/i}}{{_i}}type{{/i}}{{_i}}default{{/i}}{{_i}}description{{/i}}
    {{_i}}source{{/i}}{{_i}}array, function{{/i}}[ ]{{_i}}The data source to query against. May be an array of strings or a function. The function is passed two arguments, the query value in the input field and the process callback. The function may be used synchronously by returning the data source directly or asynchronously via the process callback's single argument.{{/i}}
    {{_i}}items{{/i}}{{_i}}number{{/i}}8{{_i}}The max number of items to display in the dropdown.{{/i}}
    {{_i}}matcher{{/i}}{{_i}}function{{/i}}{{_i}}case insensitive{{/i}}{{_i}}The method used to determine if a query matches an item. Accepts a single argument, the item against which to test the query. Access the current query with this.query. Return a boolean true if query is a match.{{/i}}
    {{_i}}sorter{{/i}}{{_i}}function{{/i}}{{_i}}exact match,
    case sensitive,
    case insensitive{{/i}}
    {{_i}}Method used to sort autocomplete results. Accepts a single argument items and has the scope of the typeahead instance. Reference the current query with this.query.{{/i}}
    {{_i}}highlighter{{/i}}{{_i}}function{{/i}}{{_i}}highlights all default matches{{/i}}{{_i}}Method used to highlight autocomplete results. Accepts a single argument item and has the scope of the typeahead instance. Should return html.{{/i}}
    + +

    {{_i}}Markup{{/i}}

    +

    {{_i}}Add data attributes to register an element with typeahead functionality.{{/i}}

     <input type="text" data-provide="typeahead">
     
    -

    {{_i}}Methods{{/i}}

    -

    .typeahead({{_i}}options{{/i}})

    -

    {{_i}}Initializes an input with a typeahead.{{/i}}

    -
    -
    -
    +

    {{_i}}Methods{{/i}}

    +

    .typeahead({{_i}}options{{/i}})

    +

    {{_i}}Initializes an input with a typeahead.{{/i}}

    + diff --git a/docs/templates/pages/less.mustache b/docs/templates/pages/less.mustache index e24d2c5fea..bcaa8af48b 100644 --- a/docs/templates/pages/less.mustache +++ b/docs/templates/pages/less.mustache @@ -3,15 +3,21 @@

    {{_i}}Using LESS with Bootstrap{{/i}}

    {{_i}}Customize and extend Bootstrap with LESS, a CSS preprocessor, to take advantage of the variables, mixins, and more used to build Bootstrap's CSS.{{/i}}

    -
    + + + +
    + - +
    diff --git a/docs/templates/pages/scaffolding.mustache b/docs/templates/pages/scaffolding.mustache index ae17ad4a8d..f2146e17e6 100644 --- a/docs/templates/pages/scaffolding.mustache +++ b/docs/templates/pages/scaffolding.mustache @@ -3,64 +3,21 @@

    {{_i}}Scaffolding{{/i}}

    {{_i}}Bootstrap is built on a responsive 12-column grid. We've also included fixed- and fluid-width layouts based on that system.{{/i}}

    - -
    + - + +
  • + Scaffolding + +
  • +
  • + Base CSS + +
  • +
  • + Components + +
  • +
  • + Javascript + +
  • +
  • + LESS + +
  • +
  • + Customize +
  • +
  • + Examples +
  • + + +