-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.js
More file actions
executable file
·75 lines (64 loc) · 1.44 KB
/
main.js
File metadata and controls
executable file
·75 lines (64 loc) · 1.44 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
jQuery(function($) {
// Whole-script strict mode syntax
"use strict";
// Begin Preloader
jQuery("#preloader-main").fadeOut();
jQuery("#preloader").delay(1000).fadeOut("slow");
// End Preloader
// Begin Wow Init
if(Modernizr.cssanimations) {
new WOW().init();
}
// End Wow Init
// Begin Fallback SVG
if (!Modernizr.svg) {
var imgs = document.getElementsByTagName('img');
var svgExtension = /.*\.svg$/
var l = imgs.length;
for(var i = 0; i < l; i++) {
if(imgs[i].src.match(svgExtension)) {
imgs[i].src = imgs[i].src.slice(0, -3) + 'png';
console.log(imgs[i].src);
}
}
}
// End Fallback SVG
// Begin Feedback Carousel
$('.feedback-carousel').owlCarousel({
items: 1,
autoplay: true,
autoplayTimeout: 6000,
autoplaySpeed: 1000,
loop: true,
dots: true,
dotsSpeed: 1000,
dragEndSpeed: 1000
});
// End Feedback Carousel
// Begin To Top
var topShow = 300;
$(window).scroll(function () {
if ($(this).scrollTop() > topShow) $('.up').fadeIn();
else $('.up').fadeOut();
});
// End To Top
// Begin Smooth Scroll
smoothScroll.init({
offset: 60
});
// End Smooth Scroll
// Begin Headhesive
var options = {
offset: 75,
classes: {
clone: 'navbar-clone',
stick: 'navbar-stick',
unstick: 'navbar-unstick'
}
}
var header = new Headhesive('.navbar', options);
// End Headhesive
// Begin Scrollspy
$('body').scrollspy({target: ".navbar", offset: 60});
// End Scrollspy
});