-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
39 lines (30 loc) · 1.02 KB
/
app.js
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
// implementing hamburger
document.addEventListener("click",function(){
var elems,instances, insts;
console.log("this is working");
elems = document.querySelectorAll('.sidenav');
instances = M.Sidenav.init(elems,{});
insts.destroy(); //to destroy carousel
});
//background particles
/*----------------------------------------
Counter Animation
----------------------------------------*/
var counter = function() {
jQuery('.js-counter').countTo({
formatter: function (value, options) {
return value.toFixed(options.decimals);
},
});
};
var counterWayPoint = function() {
if (jQuery('#probootstrap-counter').length > 0 ) {
jQuery('#probootstrap-counter').waypoint( function( direction ) {
if( direction === 'down' && !jQuery(this.element).hasClass('probootstrap-animated') ) {
setTimeout( counter , 400);
jQuery(this.element).addClass('probootstrap-animated');
}
} , { offset: '90%' } );
}
};
//particles