corrade-nucleus-nucleons – Blame information for rev 20

Subversion Repositories:
Rev:
Rev Author Line No. Line
20 office 1 // NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT
2 // IT'S ALL JUST JUNK FOR OUR DOCS!
3 // ++++++++++++++++++++++++++++++++++++++++++
4  
5 /*!
6 * Copyright 2013 Twitter, Inc.
7 *
8 * Licensed under the Creative Commons Attribution 3.0 Unported License. For
9 * details, see http://creativecommons.org/licenses/by/3.0/.
10 */
11  
12  
13 !function ($) {
14  
15 $(function(){
16  
17 var $window = $(window)
18 var $body = $(document.body)
19  
20 var navHeight = $('.navbar').outerHeight(true) + 10
21  
22 $.fn.validator.Constructor.FOCUS_OFFSET = navHeight
23  
24 $body.scrollspy({
25 target: '.bs-sidebar',
26 offset: navHeight
27 })
28  
29 $window.on('load', function () {
30 $body.scrollspy('refresh')
31 })
32  
33 $('.bs-docs-container [href=#]').click(function (e) {
34 e.preventDefault()
35 })
36  
37 // back to top
38 setTimeout(function () {
39 var $sideBar = $('.bs-sidebar')
40  
41 $sideBar.affix({
42 offset: {
43 top: function () {
44 var offsetTop = $sideBar.offset().top
45 var sideBarMargin = parseInt($sideBar.children(0).css('margin-top'), 10)
46 var navOuterHeight = $('.bs-docs-nav').height()
47  
48 return (this.top = offsetTop - navOuterHeight - sideBarMargin)
49 }
50 , bottom: function () {
51 return (this.bottom = $('.bs-footer').outerHeight(true))
52 }
53 }
54 })
55 }, 100)
56  
57 })
58  
59 }(window.jQuery)