-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.js
More file actions
54 lines (43 loc) · 1.11 KB
/
init.js
File metadata and controls
54 lines (43 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/* Material scrolltop */
$(document).ready(function() {
$('body').materialScrollTop({
revealElement: 'header',
revealPosition: 'bottom',
onScrollEnd: function() {
console.log('Scrolling End');
}
});
});
/* Materialize */
// modal
$(document).ready(function(){
// the "href" attribute of .modal-trigger must specify the modal ID that wants to be triggered
$('.modal').modal();
});
// toc dropdown
$(document).ready(function(){
$('.post-toc').dropdown({
inDuration: 300,
outDuration: 225,
constrainWidth: true,
hover: true,
gutter: 0,
belowOrigin: false,
alignment: 'left'
});
});
// scrollspy
$(document).ready(function(){
$('.scrollspy').scrollSpy({
scrollOffset: 150,
});
});
// SideNav
$(".button-collapse").sideNav({
menuWidth: 240,
//edge: 'right', // Choose the horizontal origin
closeOnClick: true // Closes side-nav on <a> clicks, useful for Angular/Meteor
});
$(".button-collapse").off("click").sideNav();
// Initialize collapsible (uncomment the line below if you use the dropdown variation)
//$('.collapsible').collapsible();