forked from aseelalmutareb/BeaverON
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
76 lines (68 loc) · 1.86 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
// Pre-loader START
let loader = document.querySelector("#preloader")
window.addEventListener('load', function () {
setTimeout(function () {
loader.style.display = 'none';
}, 3000)
})
// Pre - loader END
const panels = document.querySelectorAll('.panel');
panels.forEach((panel) => {
panel.addEventListener('click', () => {
removeActiveClasses()
panel.classList.add('active');
})
})
function removeActiveClasses() {
panels.forEach(panel => {
panel.classList.remove('active')
})
}
// Case Study
(function () {
$(".flex-container").waitForImages(
function () {
$(".spinner").fadeOut();
},
$.noop,
true,
);
$(".flex-slide").each(function () {
$(this).hover(
function () {
$(this).find(".flex-title").css({
transform: "rotate(0deg)",
top: "10%",
});
$(this).find(".flex-about").css({
opacity: "1",
});
},
function () {
$(this).find(".flex-title").css({
transform: "rotate(90deg)",
top: "15%",
});
$(this).find(".flex-about").css({
opacity: "0",
});
},
);
});
})();
/* proposal form */
$(function () {
// contact form animations
$('#speechBubble').click(function () {
$('#proposalForm').fadeToggle();
})
$(document).mouseup(function (e) {
var container = $("#proposalForm");
if (!container.is(e.target) // if the target of the click isn't the container...
&& container.has(e.target).length === 0) // ... nor a descendant of the container
{
container.fadeOut();
}
});
});
/* proposal form */