-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.js
53 lines (42 loc) · 1.07 KB
/
functions.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
// Mobile Sidebar
var side = function() {
$('.side').hide();
$('.hamburger').show();
$('.x-icon').hide();
$('.hamburger').on('click', function() {
$(this).hide(200);
$('.x-icon').show(100);
$('.side').fadeIn(300);
});
$('.x-icon').on('click', function() {
$(this).hide(300);
$('.hamburger').show(200);
$('.side').fadeOut(150);
});
};
// Review section.
var review = function() {
$('.face').on('click', function() {
var faceTop = $(this).position().top,
vertMath = -1 * (faceTop - 230);
$(this).parent().css('top', + vertMath + 'px');
$(this).addClass('has-bubble-open');
$(this).siblings().removeClass('has-bubble-open');
});
$('.face:nth-child(3)').addClass('has-bubble-open');
};
// Post icons hover-jump
var postIconJump = function() {
$('.content-box').on("mouseenter",
function() {
$(this).effect("bounce", { times: 2}, 800);
});
$('.content').on("mouseleave", function() {
$(this).effect("bounce", { times: 0}, 0);
})
};
var all = function() {
side();
review();
};
$(document).ready(all);