From f764aee4b919c28974dba7b91edac9a04172ba25 Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Mon, 23 Jan 2012 14:14:16 -0800 Subject: add templates for doc generation --- docs/javascript.html | 2426 +++++++++++++++++++++++++------------------------- 1 file changed, 1198 insertions(+), 1228 deletions(-) (limited to 'docs/javascript.html') diff --git a/docs/javascript.html b/docs/javascript.html index 6a240c4d4..fda3ae32b 100644 --- a/docs/javascript.html +++ b/docs/javascript.html @@ -25,7 +25,7 @@ - + @@ -34,8 +34,8 @@
Bootstrap -
  • Icons by Glyphicons
  • -
  • Typeahead
  • -
  • +
  • Using LESS @@ -107,1308 +107,1306 @@
  • - -
    -

    Javascript for Bootstrap

    -

    Bring Bootstrap's components to life—now with 12 custom jQuery plugins. -

    + +
    +

    Javascript for Bootstrap

    +

    Bring Bootstrap's components to life—now with 12 custom jQuery plugins. +

    - -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    -
    -
    -
    - Download Source - - - - + + +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    + Select/Unselect All Plugins +

    Note: All plugins require the latest version of jQuery to be included.

    +
    + + + + +
    + +
    +
    +

    About modals

    +

    A streamlined, but flexible, take on the traditional javascript modal plugin with only the minimum required functionality and smart defaults.

    + Download file +
    +
    +

    Static example

    +

    Below is a statically rendered modal.

    +
    + -
    -
    - Select/Unselect All Plugins -

    Note: All plugins require the latest version of jQuery to be included.

    -
    - +
    + +

    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.

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

    Using bootstrap-dropdown.js

    -

    Call the dropdowns via javascript:

    -
    $('.dropdown-toggle').dropdown()
    -

    Markup

    -

    To quickly add dropdown functionality to any element just add data-toggle="dropdown" and any valid bootstrap dropdown will automatically be activated.

    -

    Notice For added control and flexibility, optionally specify a data-target="#fat" or href="#fat" - this allows you to target specific dropdowns.

    +

    Using bootstrap-dropdown.js

    +

    Call the dropdowns via javascript:

    +
    $('.dropdown-toggle').dropdown()
    +

    Markup

    +

    To quickly add dropdown functionality to any element just add data-toggle="dropdown" and any valid bootstrap dropdown will automatically be activated.

    +

    Notice For added control and flexibility, optionally specify a data-target="#fat" or href="#fat" - this allows you to target specific dropdowns.

     <ul class="nav pills">
    -  <li class="active"><a href="#">Regular link</a></li>
    -  <li class="dropdown" id="menu1">
    -    <a class="dropdown-toggle" data-toggle="dropdown" href="#menu1">
    -      Dropdown
    -      <b class="caret"></b>
    -    </a>
    -    <ul class="dropdown-menu">
    -      <li><a href="#">Action</a></li>
    -      <li><a href="#">Another action</a></li>
    -      <li><a href="#">Something else here</a></li>
    -      <li class="divider"></li>
    -      <li><a href="#">Separated link</a></li>
    -    </ul>
    -  </li>
    -  ...
    +<li class="active"><a href="#">Regular link</a></li>
    +<li class="dropdown" id="menu1">
    +<a class="dropdown-toggle" data-toggle="dropdown" href="#menu1">
    +  Dropdown
    +  <b class="caret"></b>
    +</a>
    +<ul class="dropdown-menu">
    +  <li><a href="#">Action</a></li>
    +  <li><a href="#">Another action</a></li>
    +  <li><a href="#">Something else here</a></li>
    +  <li class="divider"></li>
    +  <li><a href="#">Separated link</a></li>
    +</ul>
    +</li>
    +...
     </ul>
    -

    Methods

    -

    $().dropdown()

    -

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

    - - - +

    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 -
    -
    -

    Example navbar with scrollspy

    -

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

    - -
    +
    +

    @fat

    +

    + Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat. +

    +

    @mdo

    +

    + Veniam marfa mustache skateboard, adipisicing fugiat velit pitchfork beard. Freegan beard aliqua cupidatat mcsweeney's vero. Cupidatat four loko nisi, ea helvetica nulla carles. Tattooed cosby sweater food truck, mcsweeney's quis non freegan vinyl. Lo-fi wes anderson +1 sartorial. Carles non aesthetic exercitation quis gentrify. Brooklyn adipisicing craft beer vice keytar deserunt. +

    +

    one

    +

    + Occaecat commodo aliqua delectus. Fap craft beer deserunt skateboard ea. Lomo bicycle rights adipisicing banh mi, velit ea sunt next level locavore single-origin coffee in magna veniam. High life id vinyl, echo park consequat quis aliquip banh mi pitchfork. Vero VHS est adipisicing. Consectetur nisi DIY minim messenger bag. Cred ex in, sustainable delectus consectetur fanny pack iphone. +

    +

    two

    +

    + In incididunt echo park, officia deserunt mcsweeney's proident master cleanse thundercats sapiente veniam. Excepteur VHS elit, proident shoreditch +1 biodiesel laborum craft beer. Single-origin coffee wayfarers irure four loko, cupidatat terry richardson master cleanse. Assumenda you probably haven't heard of them art party fanny pack, tattooed nulla cardigan tempor ad. Proident wolf nesciunt sartorial keffiyeh eu banh mi sustainable. Elit wolf voluptate, lo-fi ea portland before they sold out four loko. Locavore enim nostrud mlkshk brooklyn nesciunt. +

    +

    three

    +

    + Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat. +

    +

    Keytar twee blog, culpa messenger bag marfa whatever delectus food truck. Sapiente synth id assumenda. Locavore sed helvetica cliche irony, thundercats you probably haven't heard of them consequat hoodie gluten-free lo-fi fap aliquip. Labore elit placeat before they sold out, terry richardson proident brunch nesciunt quis cosby sweater pariatur keffiyeh ut helvetica artisan. Cardigan craft beer seitan readymade velit. VHS chambray laboris tempor veniam. Anim mollit minim commodo ullamco thundercats. +

    +
    +
    +

    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>
    +

    Notice Navbar anchor tags 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>. +

    Options

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

    This plugin adds quick, dynamic tab and pill functionality for transitioning through local content.

    - Download file -
    -
    -

    Example tabs

    -

    Click the tabs below to toggle between hidden panes, even via dropdown menus.

    -
    +
    + + + +
    + +
    +
    +

    About Tooltips

    +

    Inspired by the excellent jQuery.tipsy plugin written by Jason Frame; Tooltips are an updated version, which don't rely on images, uss 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. +

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

    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.

    + -
    -
    -

    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
    placementstring'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/hiding the popover (ms)

    -

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

    -

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

    -
    -

    Notice Individual popover instance options 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 the 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')
    -
    +
    +

    Using bootstrap-popover.js

    +

    Enable popovers via javascript:

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

    Options

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Nametypedefaultdescription
    animationbooleantrueapply a css fade transition to the tooltip
    placementstring'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/hiding the popover (ms)

    +

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

    +

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

    +
    +

    Notice Individual popover instance options 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 the 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')
    +
    +
    +
    + + + + +
    + +
    +
    +

    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.
    -
    - - - - -
    -
    - - - - -
    - -
    -
    -

    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:

    -
    $('.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:

    +
    $('.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>
     
     <!-- Add data-toggle="buttons-checkbox" for checkbox style toggling on btn-group -->
     <div class="btn-group" data-toggle="buttons-checkbox">
    -  <button class="btn">Left</button>
    -  <button class="btn">Middle</button>
    -  <button class="btn">Right</button>
    +<button class="btn">Left</button>
    +<button class="btn">Middle</button>
    +<button class="btn">Right</button>
     </div>
     
     <!-- Add data-toggle="buttons-radio" for radio style toggling on btn-group -->
     <div class="btn-group" data-toggle="buttons-radio">
    -  <button class="btn">Left</button>
    -  <button class="btn">Middle</button>
    -  <button class="btn">Right</button>
    +<button class="btn">Left</button>
    +<button class="btn">Middle</button>
    +<button class="btn">Right</button>
     </div>
     
    -

    Methods

    -

    $().button('toggle')

    -

    Toggles push state. Gives btn the look that it's been activated.

    -

    Notice 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>
    -

    - Notice Firefox persists the disabled state across page loads. A workaround for this is to use: autocomplete="off". More info can be found here. -

    -

    $().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 btn the look that it's been activated.

    +

    Notice 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>
    +

    + Notice Firefox persists the disabled state across page loads. A workaround for this is to use: autocomplete="off". More info can be found here. +

    +

    $().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')
    +$('.btn').button('complete')
     </script>
    -
    -
    -
    - - - - -
    - -
    -
    -

    About

    -

    Get base styles and flexible support for collapsible components like accordions and navigation.

    - Download file -
    -
    -

    Example accordion

    -

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

    - -
    -
    - -
    -
    - Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. -
    -
    +
    +
    +
    + + + + +
    + +
    +
    +

    About

    +

    Get base styles and flexible support for collapsible components like accordions and navigation.

    + Download file +
    +
    +

    Example accordion

    +

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

    + +
    +
    + +
    +
    + Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
    -
    - -
    -
    - Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. -
    -
    +
    +
    +
    + +
    +
    + Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
    -
    - -
    -
    - Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. -
    -
    +
    +
    +
    + +
    +
    + Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
    +
    +
    - -
    -

    Using bootstrap-collapse.js

    -

    Enable via javascript:

    -
    $(".collapse").collapse()
    -

    Options

    - - - - - - - - - - - - - - - - - - - - - - - -
    Nametypedefaultdescription
    parentselectorfalseIf selector then all collapsible elements under the specified parent will be closed when this collasabile item is shown. (similar to traditional accordion behavior)
    togglebooleantrueToggles the collapsible element on invocation
    -

    Markup

    -

    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.

    -
    +      
    +      
    +

    Using bootstrap-collapse.js

    +

    Enable via javascript:

    +
    $(".collapse").collapse()
    +

    Options

    + + + + + + + + + + + + + + + + + + + + + + + +
    Nametypedefaultdescription
    parentselectorfalseIf selector then all collapsible elements under the specified parent will be closed when this collasabile item is shown. (similar to traditional accordion behavior)
    togglebooleantrueToggles the collapsible element on invocation
    +

    Markup

    +

    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.

    +
     <button class="btn danger" data-toggle="collapse" data-target="#demo">
    -  simple collapsible
    +simple collapsible
     </button>
     
     <div id="demo" class="collapse in"> … </div>
    -

    Notice To add accordion like group management to a collapsible control just add the additional data attribute data-parent="#selector". Refer to the demo below to see this in action.

    -

    Methods

    -

    .collapse(options)

    -

    Activates your content as a collapsible element. Accepts an optional options object. +

    Notice To add accordion like group management to a collapsible control just add the additional data attribute data-parent="#selector". Refer to the demo below to see this in action.

    +

    Methods

    +

    .collapse(options)

    +

    Activates your content as a collapsible element. Accepts an optional options object.

     $('#myCollapsible').collapse({
    -  toggle: false
    +toggle: false
     })
    -

    .collapse('toggle')

    -

    Toggles a collapsible element to shown or hidden.

    -

    .collapse('show')

    -

    Shows a collapsible element.

    -

    .collapse('hide')

    -

    Hides a collapsible element.

    -

    Events

    -

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

    - - - - - - - - - - - - - - - - - - - - - - - - - -
    EventDescription
    showThis event fires immediately when the show instance method is called.
    shownThis event is fired when a collapse element has been made visible to the user (will wait for css transitions to complete).
    hide - This event is fired immediately when the hide method has been called. -
    hiddenThis event is fired when a collapse element has been hidden from the user (will wait for css transitions to complete).
    +

    .collapse('toggle')

    +

    Toggles a collapsible element to shown or hidden.

    +

    .collapse('show')

    +

    Shows a collapsible element.

    +

    .collapse('hide')

    +

    Hides a collapsible element.

    +

    Events

    +

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

    + + + + + + + + + + + + + + + + + + + + + + + + + +
    EventDescription
    showThis event fires immediately when the show instance method is called.
    shownThis event is fired when a collapse element has been made visible to the user (will wait for css transitions to complete).
    hide + This event is fired immediately when the hide method has been called. +
    hiddenThis event is fired when a collapse element has been hidden from the user (will wait for css transitions to complete).
     $('#myCollapsible').on('hidden', function () {
    -  // do something ...
    +// do something ...
     })
    -
    -
    -
    - - - - - + + + + + - - - - -
    - + +
    + + + + +
    + +
    +
    +

    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.

    +
    +
    -
    -
    -

    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
    itemsnumber8The max number of items to display in the dropdown.
    - -

    Markup

    -

    Add data attributes to register an element with typeahead functionality.

    +
    +

    Using bootstrap-typeahead.js

    +

    Call the typeahead via javascript:

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

    Options

    + + + + + + + + + + + + + + + + + +
    Nametypedefaultdescription
    itemsnumber8The max number of items to display in the dropdown.
    + +

    Markup

    +

    Add data attributes to register an element with typeahead functionality.

     <input type="text" data-provide="typeahead">
     
    -
    -
    -
    - - - + + + + @@ -1438,34 +1437,5 @@ $('.myCarousel').carousel({ - -- cgit v1.2.3