@@ -95,78 +95,78 @@ $(document).ready(function () {
95
95
96
96
// js
97
97
$ ( document ) . ready ( function ( ) {
98
- function randomCarousel ( id ) {
99
- var num = $ ( id + ' .item' ) . length ;
100
- var slide = Math . floor ( ( Math . random ( ) * num ) ) ;
101
- $ ( id + ' .item' ) . each ( function ( index ) {
102
- if ( index == slide ) {
103
- $ ( this ) . addClass ( 'active' ) ;
104
- } else {
105
- $ ( this ) . removeClass ( 'active' ) ;
106
- }
107
- } ) ;
108
- }
98
+ function randomCarousel ( id ) {
99
+ var num = $ ( id + ' .item' ) . length ;
100
+ var slide = Math . floor ( ( Math . random ( ) * num ) ) ;
101
+ $ ( id + ' .item' ) . each ( function ( index ) {
102
+ if ( index == slide ) {
103
+ $ ( this ) . addClass ( 'active' ) ;
104
+ } else {
105
+ $ ( this ) . removeClass ( 'active' ) ;
106
+ }
107
+ } ) ;
108
+ }
109
109
110
- randomCarousel ( '#carousel-tweets' ) ;
111
- randomCarousel ( '#carousel-companies' ) ;
110
+ randomCarousel ( '#carousel-tweets' ) ;
111
+ randomCarousel ( '#carousel-companies' ) ;
112
112
113
- var toc = $ ( '#toc' ) ;
114
- if ( toc . length ) {
115
- toc . toc ( {
116
- 'selectors' : 'h2' ,
117
- 'prefix' : 'toc' ,
118
- 'container' : '#page' ,
119
- 'anchorName' : function ( i , heading , prefix ) { //custom function for anchor name
120
- return $ ( heading ) . text ( ) . replace ( / \s / g, '-' ) . replace ( / [ ^ \w - ] / g, '' ) ;
121
- } ,
122
- } ) ;
123
- }
113
+ var toc = $ ( '#toc' ) ;
114
+ if ( toc . length ) {
115
+ toc . toc ( {
116
+ 'selectors' : 'h2' ,
117
+ 'prefix' : 'toc' ,
118
+ 'container' : '#page' ,
119
+ 'anchorName' : function ( i , heading , prefix ) { //custom function for anchor name
120
+ return $ ( heading ) . text ( ) . replace ( / \s / g, '-' ) . replace ( / [ ^ \w - ] / g, '' ) ;
121
+ } ,
122
+ } ) ;
123
+ }
124
124
125
- var page = $ ( '#page table' ) ;
126
- var tocNext = $ ( '#toc' ) ;
127
- var tocNextUl = $ ( '#toc > ul' ) ;
128
- var tocNextUlLi = $ ( '#toc ul.list li a' ) ;
125
+ var page = $ ( '#page table' ) ;
126
+ var tocNext = $ ( '#toc' ) ;
127
+ var tocNextUl = $ ( '#toc > ul' ) ;
128
+ var tocNextUlLi = $ ( '#toc ul.list li a' ) ;
129
129
130
- if ( page . length ) {
131
- page . addClass ( 'table table-striped table-bordered' ) ;
132
- }
130
+ if ( page . length ) {
131
+ page . addClass ( 'table table-striped table-bordered' ) ;
132
+ }
133
133
134
- if ( tocNext . length ) {
135
- tocNext . toc ( {
136
- 'selectors' : 'h2,h3,h4' ,
137
- 'prefix' : 'toc' ,
138
- 'container' : '#page' ,
139
- //custom function for anchor name
140
- 'anchorName' : function ( i , heading , prefix ) {
141
- return $ ( heading ) . text ( ) . replace ( / \s / g, '-' ) . replace ( / [ ^ \w - ] / g, '' ) ;
142
- } ,
143
- } ) ;
144
- }
134
+ if ( tocNext . length ) {
135
+ tocNext . toc ( {
136
+ 'selectors' : 'h2,h3,h4' ,
137
+ 'prefix' : 'toc' ,
138
+ 'container' : '#page' ,
139
+ //custom function for anchor name
140
+ 'anchorName' : function ( i , heading , prefix ) {
141
+ return $ ( heading ) . text ( ) . replace ( / \s / g, '-' ) . replace ( / [ ^ \w - ] / g, '' ) ;
142
+ } ,
143
+ } ) ;
144
+ }
145
145
146
- // List.js
147
- if ( tocNextUl . length ) {
148
- tocNextUl . addClass ( 'list' ) ;
149
- }
146
+ // List.js
147
+ if ( tocNextUl . length ) {
148
+ tocNextUl . addClass ( 'list' ) ;
149
+ }
150
150
151
- if ( tocNextUlLi . length ) {
152
- tocNextUlLi . addClass ( 'searchitem' ) ;
153
- }
151
+ if ( tocNextUlLi . length ) {
152
+ tocNextUlLi . addClass ( 'searchitem' ) ;
153
+ }
154
154
155
- var options = {
156
- valueNames : [ 'searchitem' ]
157
- } ;
158
- var userList = new List ( 'searchable' , options ) ;
159
- // end List.js
160
- // docrdy
155
+ var options = {
156
+ valueNames : [ 'searchitem' ]
157
+ } ;
158
+ var userList = new List ( 'searchable' , options ) ;
159
+ // end List.js
160
+ // docrdy
161
+
162
+ // Adding this layout functionality for mobile views with the homepage hero
163
+ var navbarToggle = $ ( '.navbar-toggle' )
164
+ if ( navbarToggle . length ) {
165
+ navbarToggle . click ( function ( ) {
166
+ $ ( '.row.home' ) . toggleClass ( 'no-padding-top' ) ;
167
+ } ) ;
168
+ }
161
169
162
- // Adding this layout functionality for mobile views with the homepage hero
163
- var navbarToggle = $ ( '.navbar-toggle' )
164
- if ( navbarToggle . length ) {
165
- navbarToggle . click ( function ( ) {
166
- $ ( '.row.home' ) . toggleClass ( 'no-padding-top' ) ;
167
- } ) ;
168
- }
169
- = === ===
170
170
function randomCarousel ( id ) {
171
171
var num = $ ( id + ' .item' ) . length ;
172
172
var slide = Math . floor ( ( Math . random ( ) * num ) ) ;
0 commit comments