mirror of
https://github.com/ysoftdevs/cloud-workshop.git
synced 2026-01-18 17:47:00 +01:00
add 10 exercises
This commit is contained in:
46
exercise-10/index.html
Normal file
46
exercise-10/index.html
Normal file
@@ -0,0 +1,46 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
|
||||
<!-- Latest compiled and minified CSS -->
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
|
||||
|
||||
<script src="https://code.jquery.com/jquery-3.1.1.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
function buttonClickHandler(event) {
|
||||
var message;
|
||||
if (event.target.textContent == "slovo") {
|
||||
message = "Congratulation! Correct answer.";
|
||||
$("#statusIcon").addClass("glyphicon-ok").removeClass("glyphicon-remove");
|
||||
} else {
|
||||
message = "Incorrect answer. Try again.";
|
||||
$("#statusIcon").addClass("glyphicon-remove").removeClass("glyphicon-ok");
|
||||
}
|
||||
$("#status").text(message);
|
||||
}
|
||||
|
||||
function documentReady() {
|
||||
$(".btn").click(buttonClickHandler);
|
||||
}
|
||||
|
||||
$( document ).ready(documentReady);
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<h1>Word catcher</h1>
|
||||
<div>word</div>
|
||||
<div>
|
||||
<button type="button" class="btn btn-default">dům</button>
|
||||
<button type="button" class="btn btn-default">auto</button>
|
||||
<button type="button" class="btn btn-default">slovo</button>
|
||||
<button type="button" class="btn btn-default">škola</button>
|
||||
</div>
|
||||
<div>
|
||||
<span id="statusIcon" class="glyphicon" ></span>
|
||||
<span id="status">...select word...</span>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user