-
Notifications
You must be signed in to change notification settings - Fork 2
/
style.js
60 lines (47 loc) · 1.5 KB
/
style.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
$(document).on("scroll", function() {
var $pageTop = $(document).scrollTop();
var $pageBottom = $pageTop + $(window).height();
var $cards = $('.card');
var $contact = $('.contact-div');
for (let i = 0; i < $cards.length; i++) {
let card = $cards[i];
if ($(card).position().top < $pageBottom) {
$(card).addClass("visible");
}
}
if ($($contact).position().top < $pageBottom) {
$($contact).addClass("visible");
}
});
$(document).on("click", function(event){
var clsname = event.target.id;
// alert(clsname);
if (clsname=="B1") {
$(".cc2,.cc3").addClass("test");
$('.cc2', '.cc3').prop('disabled', true);
}
else if (clsname=="B2") {
$(".cc1,.cc3").addClass("test");
$('.cc1', '.cc3').prop('disabled', true);
}
else if (clsname=="B3") {
$(".cc1,.cc2").addClass("test");
$('.cc1', '.cc2').prop('disabled', true);
}
});
$(document).on("click", function(event){
var clsname = event.target.id;
// alert(clsname);
if (clsname=="BB1") {
$(".c22,.c33").addClass("test");
$('.c22', '.c33').prop('disabled', true);
}
else if (clsname=="BB2") {
$(".c11,.c33").addClass("test");
$('.c11', '.c33').prop('disabled', true);
}
else if (clsname=="BB3") {
$(".c11,.c22").addClass("test");
$('.c11', '.c22').prop('disabled', true);
}
});