-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscripts.js
78 lines (72 loc) · 2.5 KB
/
scripts.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
$(document).ready(function(){
qui = "Qui ?";
ou = "Oú ?";
quand = "Quand ?";
quoi = "Quoi ?"
wcircleparams = {
width: '65px',
height: '65px',
angle_start : -Math.PI/2,//-Math.PI/2,
delay: 50,
distance: 100,
angle_interval: -Math.PI/4,
easingFuncShow:"easeOutBack",
easingFuncHide:"easeInBack",
step:35,
itemRotation:360,
iconRotation:0
};
wcircleparams_iot = {
width: '65px',
height: '65px',
angle_start : Math.PI/2,//-Math.PI/2,
delay: 50,
distance: 100,
angle_interval: -Math.PI/4,
easingFuncShow:"easeOutBack",
easingFuncHide:"easeInBack",
step:35,
itemRotation:360,
iconRotation:0
};
updatePhrase();
$('.menu_qui').WCircleMenu(wcircleparams);
$('.menu_ou').WCircleMenu(wcircleparams);
$('.menu_quand').WCircleMenu(wcircleparams);
$('.menu_iot').WCircleMenu(wcircleparams_iot);
$('.menu_qui .wcircle-menu-item').on('click',function(){
if(!$('.menu_qui').hasClass("wcircle-animating")) {
$('.menu_qui .wcircle-icon').html($(this).html());
qui = $('.menu_qui .wcircle-icon img').attr('title');
$('.menu_qui .wcircle-icon div').html(qui);
updatePhrase();
}
});
$('.menu_ou .wcircle-menu-item').on('click',function(){
if(!$('.menu_ou').hasClass("wcircle-animating")){
$('.menu_ou .wcircle-icon').html($(this).html());
ou = $('.menu_ou .wcircle-icon img').attr('title');
$('.menu_ou .wcircle-icon div').html(ou);
updatePhrase();
}
});
$('.menu_quand .wcircle-menu-item').on('click',function(){
if(!$('.menu_quand').hasClass("wcircle-animating")){
$('.menu_quand .wcircle-icon').html($(this).html());
quand = $('.menu_quand .wcircle-icon img').attr('title');
$('.menu_quand .wcircle-icon div').html(quand);
updatePhrase();
}
});
$('.menu_iot .wcircle-menu-item').on('click',function(){
if(!$('.menu_iot').hasClass("wcircle-animating")){
$('.menu_iot .wcircle-icon').html($(this).html());
quoi = $('.menu_iot .wcircle-icon img').attr('title');
$('.menu_iot .wcircle-icon div').html(quoi);
updatePhrase();
}
});
function updatePhrase() {
$('.phrase').html("Si <span class='cyan'>"+qui+"</span> se trouve dans <span class='green'>"+ou+"</span> <span class='yellow'>"+quand+"</span> alors <span class='red'>"+quoi+"</span>.")
}
});