bootstrap-source/bootstrap-3.0.3/docs-assets/js/application.js
changeset 54 0ded9d7748b7
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/bootstrap-source/bootstrap-3.0.3/docs-assets/js/application.js	Fri Dec 20 22:49:16 2013 +0100
     1.3 @@ -0,0 +1,103 @@
     1.4 +// NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT
     1.5 +// IT'S ALL JUST JUNK FOR OUR DOCS!
     1.6 +// ++++++++++++++++++++++++++++++++++++++++++
     1.7 +
     1.8 +/*!
     1.9 + * Copyright 2013 Twitter, Inc.
    1.10 + *
    1.11 + * Licensed under the Creative Commons Attribution 3.0 Unported License. For
    1.12 + * details, see http://creativecommons.org/licenses/by/3.0/.
    1.13 + */
    1.14 +
    1.15 +
    1.16 +!function ($) {
    1.17 +
    1.18 +  $(function(){
    1.19 +
    1.20 +    // IE10 viewport hack for Surface/desktop Windows 8 bug
    1.21 +    //
    1.22 +    // See Getting Started docs for more information
    1.23 +    if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
    1.24 +      var msViewportStyle = document.createElement("style");
    1.25 +      msViewportStyle.appendChild(
    1.26 +        document.createTextNode(
    1.27 +          "@-ms-viewport{width:auto!important}"
    1.28 +        )
    1.29 +      );
    1.30 +      document.getElementsByTagName("head")[0].
    1.31 +        appendChild(msViewportStyle);
    1.32 +    }
    1.33 +
    1.34 +
    1.35 +    var $window = $(window)
    1.36 +    var $body   = $(document.body)
    1.37 +
    1.38 +    var navHeight = $('.navbar').outerHeight(true) + 10
    1.39 +
    1.40 +    $body.scrollspy({
    1.41 +      target: '.bs-sidebar',
    1.42 +      offset: navHeight
    1.43 +    })
    1.44 +
    1.45 +    $window.on('load', function () {
    1.46 +      $body.scrollspy('refresh')
    1.47 +    })
    1.48 +
    1.49 +    $('.bs-docs-container [href=#]').click(function (e) {
    1.50 +      e.preventDefault()
    1.51 +    })
    1.52 +
    1.53 +    // back to top
    1.54 +    setTimeout(function () {
    1.55 +      var $sideBar = $('.bs-sidebar')
    1.56 +
    1.57 +      $sideBar.affix({
    1.58 +        offset: {
    1.59 +          top: function () {
    1.60 +            var offsetTop      = $sideBar.offset().top
    1.61 +            var sideBarMargin  = parseInt($sideBar.children(0).css('margin-top'), 10)
    1.62 +            var navOuterHeight = $('.bs-docs-nav').height()
    1.63 +
    1.64 +            return (this.top = offsetTop - navOuterHeight - sideBarMargin)
    1.65 +          }
    1.66 +        , bottom: function () {
    1.67 +            return (this.bottom = $('.bs-footer').outerHeight(true))
    1.68 +          }
    1.69 +        }
    1.70 +      })
    1.71 +    }, 100)
    1.72 +
    1.73 +    setTimeout(function () {
    1.74 +      $('.bs-top').affix()
    1.75 +    }, 100)
    1.76 +
    1.77 +    // tooltip demo
    1.78 +    $('.tooltip-demo').tooltip({
    1.79 +      selector: "[data-toggle=tooltip]",
    1.80 +      container: "body"
    1.81 +    })
    1.82 +
    1.83 +    $('.tooltip-test').tooltip()
    1.84 +    $('.popover-test').popover()
    1.85 +
    1.86 +    $('.bs-docs-navbar').tooltip({
    1.87 +      selector: "a[data-toggle=tooltip]",
    1.88 +      container: ".bs-docs-navbar .nav"
    1.89 +    })
    1.90 +
    1.91 +    // popover demo
    1.92 +    $("[data-toggle=popover]")
    1.93 +      .popover()
    1.94 +
    1.95 +    // button state demo
    1.96 +    $('#fat-btn')
    1.97 +      .click(function () {
    1.98 +        var btn = $(this)
    1.99 +        btn.button('loading')
   1.100 +        setTimeout(function () {
   1.101 +          btn.button('reset')
   1.102 +        }, 3000)
   1.103 +      })
   1.104 +})
   1.105 +
   1.106 +}(jQuery)
Impressum Datenschutzerklärung