• Mark Otto's avatar
    redo hella docs scss · b68acc89
    Mark Otto authored
    - clean out commented out code
    - break apart homepage.scss into sub files by component
    - rename a few files to reflect their new component names
    b68acc89
application.js 2.47 KiB
// NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT
// IT'S ALL JUST JUNK FOR OUR DOCS!
// ++++++++++++++++++++++++++++++++++++++++++
/*!
 * JavaScript for Bootstrap's docs (http://getbootstrap.com)
 * Copyright 2011-2014 Twitter, Inc.
 * Licensed under the Creative Commons Attribution 3.0 Unported License. For
 * details, see http://creativecommons.org/licenses/by/3.0/.
!function ($) {
  $(function () {
    // IE10 viewport hack for Surface/desktop Windows 8 bug
    // See Getting Started docs for more information
    if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
      var msViewportStyle = document.createElement('style');
      msViewportStyle.appendChild(
        document.createTextNode(
          '@-ms-viewport{width:auto!important}'
      document.querySelector('head').
        appendChild(msViewportStyle);
    var $window = $(window)
    var $body   = $(document.body)
    var navHeight = $('.navbar').outerHeight(true) + 10
    $body.scrollspy({
      target: '.bs-sidebar',
      offset: navHeight
    $window.on('load', function () {
      $body.scrollspy('refresh')
    $('.bs-docs-container [href=#]').click(function (e) {
      e.preventDefault()
    // back to top
    setTimeout(function () {
      var $sideBar = $('.bs-sidebar')
      $sideBar.affix({
        offset: {
          top: function () {
            var offsetTop      = $sideBar.offset().top
            var sideBarMargin  = parseInt($sideBar.children(0).css('margin-top'), 10)
            var navOuterHeight = $('.bs-docs-nav').height()
            return (this.top = offsetTop - navOuterHeight - sideBarMargin)
          bottom: function () {
            return (this.bottom = $('.bs-footer').outerHeight(true))
    }, 100)
    setTimeout(function () {
7172737475767778798081828384858687888990919293949596979899100101102103104
$('.bs-top').affix() }, 100) // tooltip demo $('.tooltip-demo').tooltip({ selector: '[data-toggle=tooltip]', container: 'body' }) $('.tooltip-test').tooltip() $('.popover-test').popover() $('.bs-docs-navbar').tooltip({ selector: 'a[data-toggle=tooltip]', container: '.bs-docs-navbar .nav' }) // popover demo $('[data-toggle=popover]') .popover() // button state demo $('#loading-example-btn') .click(function () { var btn = $(this) btn.button('loading') setTimeout(function () { btn.button('reset') }, 3000) }) }) }(jQuery)