-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcustom.js
84 lines (77 loc) · 2.27 KB
/
custom.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
$(function () {
/* Wow Scroll Animation */
wow = new WOW({
boxClass: "wow",
offset: 150,
mobile: true,
});
wow.init();
});
$(function () {
// btn 제한
let btncount = 0;
if (btncount === 0) {
$(".left-btn").addClass("limit");
}
// Card Scroll Btn
$(".right-btn").click(function () {
// margin-right
if (btncount < 4) {
let margin = parseInt($(".cards-scroll").css("margin-left")) || 0;
$(".cards-scroll").css("margin-left", margin - 344 + "px");
btncount++;
$(".left-btn").removeClass("limit");
} else {
$(".right-btn").addClass("limit");
}
});
$(".left-btn").click(function () {
// margin-left값
if (btncount > 0) {
let margin = parseInt($(".cards-scroll").css("margin-left")) || 0;
$(".cards-scroll").css("margin-left", margin + 344 + "px");
btncount--;
$(".right-btn").removeClass("limit");
} else {
$(".left-btn").addClass("limit");
}
});
let incentiveBtnCount = 0;
if (incentiveBtnCount === 0) {
$(".incentive-left-btn").addClass("limit");
}
// Card Scroll Btn
$(".incentive-right-btn").click(function () {
// margin-right
if (btncount < 4) {
let margin = parseInt($(".incentive-cards").css("margin-left")) || 0;
$(".incentive-cards").css("margin-left", margin - 372 + "px");
btncount++;
$(".incentive-left-btn").removeClass("limit");
} else {
$(".incentive-right-btn").addClass("limit");
}
});
$(".incentive-left-btn").click(function () {
// margin-left값
if (btncount > 0) {
let margin = parseInt($(".incentive-cards").css("margin-left")) || 0;
$(".incentive-cards").css("margin-left", margin + 372 + "px");
btncount--;
$(".incentive-right-btn").removeClass("limit");
} else {
$(".incentive-left-btn").addClass("limit");
}
});
// Augment Accprdion
$(".augment-desc").eq(0).show();
$(".augment-title").click(function () {
$(this).next().stop().slideDown();
$(this).parent().siblings().children(".augment-desc").stop().slideUp();
$(this).parent().addClass("active");
$(this).parent().siblings().removeClass("active");
// 이미지
let imgSrc = $(this).parent().attr("data-img");
$(".augment-right img").attr("src", imgSrc);
});
});