This repository has been archived by the owner on Mar 17, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
90 lines (79 loc) · 2.87 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
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
$(document).ready(function() {
// for work cards
if($(window).width()<992){
$('.work-left, .work-right').removeClass('col s6');
}
// preloader
$(window).load(function(){
$('#preloader').animate({opacity: 1}, 0).animate({opacity: 0}, 2500, function () {
$(this).remove();
});
});
// initialize some elements
$('.tooltipped').tooltip({delay: 50});
$(".button-collapse").sideNav({
menuWidth: 300, // Default is 300
edge: 'left', // Choose the horizontal origin
closeOnClick: true, // Closes side-nav on <a> clicks, useful for Angular/Meteor
draggable: true // Choose whether you can drag to open on touch screens
});
$('#bod').animate({opacity: 0}, 0).css({'background-image': 'url("vape2.jpeg") no-repeat center center fixed'}).animate({opacity: 1}, 2500);
// changes size of work cards
$(window).resize(function(){
if($(window).width()<992){
$('.work-left, .work-right').removeClass('col s6');
}else if ($(window).width()>992) {
$('.work-left, .work-right').addClass('col s6');
}
});
$(".nav-contact").click(function() {
$('html, body').animate({
scrollTop: $(".page-footer").offset().top
}, 2000);
// add neon
$(".foot-icon").addClass("play");
// remove neon
setTimeout(function() {
$(".foot-icon").removeClass("play");
}, 2000);
});
var cards = false;
$(".nav-work").click(function () {
console.log(cards);
if (cards) {
cards = false;
// remove existing classes
$(".work-left").removeClass("animated bounceInLeft");
$(".work-right").removeClass("animated bounceInRight");
// make cards leave
$(".work-left").addClass("animated bounceOutLeft");
$(".work-right").addClass("animated bounceOutRight");
$('.work-right, .work-left').on('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () {
$(".work-right, .work-left").addClass("hidden");
});
console.log(cards);
}else {
// remove existing classes
$(".work-right, .work-left").removeClass("hidden");
$(".work-left").removeClass("animated bounceOutLeft");
$(".work-right").removeClass("animated bounceOutRight");
// make cards enter
$(".work-left").addClass("animated bounceInLeft");
$(".work-right").addClass("animated bounceInRight");
$('.work-right, .work-left').on('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () {
$(".work-right, .work-left").removeClass("hidden");
});
$(".work-right, .work-left").removeClass("hidden");
cards = true;
console.log(cards);
$('html, body').animate({
scrollTop: $(".work").offset().top
}, 1000);
};
});
$("#img-highQuality").off().on("load", function() {
$("body").css({
"background-image" : "url(images/vape2.jpeg)"
});
});
});