-
Notifications
You must be signed in to change notification settings - Fork 0
/
cis.html
131 lines (116 loc) · 3.99 KB
/
cis.html
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<!DOCTYPE html>
<html>
<head>
<title>canvas</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="css/mystyles.css">
<script src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/jquery-3.1.1.js"></script>
<script type="text/javascript" src="js/jquery-ui.js"></script>
<script type="text/javascript">
$(document).ready(function(){
var stage = $('#stage');
var stage1 = $('#stage1');
var countryArray = Object.keys(countries);
var countryName = randomEnvelope(countryArray);
countryArray.splice(countryArray.indexOf(countryName), 1);
var countryName2 = randomEnvelope(countryArray);
createCountry(stage, stage1, countryName);
createCountry(stage, stage1, countryName2);
$(function () {
var parent = $("#stage1");
var divs = parent.children();
while (divs.length) {
parent.append(divs.splice(Math.floor(Math.random() * divs.length), 1)[0]);
}
});
$( ".ui-widget-content" ).draggable();
function showBorder(jqEl, className) {
if(jqEl.hasClass(className)){
$(jqEl).css("border", "3px solid green");
} else {
$(jqEl).css("border", "3px solid red");
}
}
//Kazachstan
$( "#KazCanvas" ).droppable({
accept: ".ui-widget-content",
drop: function( event, ui ) {
showBorder($(event.toElement), 'kaz-drop');
}
});
//Belarus
$( "#BelCanvas" ).droppable({
accept: " .ui-widget-content",
drop: function( event, ui ) {
showBorder($(event.toElement), 'bel-drop');
}
});
//Azerbaijan
$( "#AzerbCanvas" ).droppable({
accept: ".ui-widget-content",
drop: function( event, ui ) {
showBorder($(event.toElement), 'azerb-drop');
}
});
})
</script>
</head>
<body>
<header>
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#">Geographical Quizes</a>
</div>
<ul class="nav navbar-nav">
<li><a href="#">Home</a></li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">Capital quizes
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#">Capitals of Latin America</a></li>
<li><a href="#">Capitals of Asia</a></li>
<li><a href="#">Capitals of Europe</a></li>
<li><a href="#">Capitals of Africa</a></li>
</ul>
</li>
<li class="active">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">Envelope quizes
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="dinamic.html">Envelopes from BRICS countries</a></li>
<li><a href="eu_quiz.html">Envelopes from EU countries</a></li>
<li><a href="cis.html">Envelopes from CIS countries</a></li>
</ul>
</li>
<li>
<a class="dropdown-toggle" data-toggle="dropdown" href="#">Culture quizes
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="food_quiz.html">Ethnic food quiz</a></li>
<li><a href="celebration%20quiz.html">Celebrations quiz</a></li>
<li><a href="clothes_quiz.html">Traditional clothes quiz</a></li>
</ul>
</li>
</ul>
</div>
</nav>
</header>
<h1 class = 'h1'>Envelope quizes (CIS)</h1>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#">Home</a></li>
<li class="breadcrumb-item"><a href="#">Envelope quizes</a></li>
<li class="breadcrumb-item active">Envelopes from CIS countries</li>
</ol>
<div class = "container">
<div class = "row" id = "stage">
</div>
</div>
<br><br><br>
<div id = 'stage1'></div>
<script src ="js/cis.js"></script>
</body>
</html>