Commit 4eb60a22 authored by Tapio Mäntysalo's avatar Tapio Mäntysalo
Browse files

Added dropdown for choosing the task

parent 26f44dfb
......@@ -2,7 +2,21 @@
<html lang="en">
<!-- Required meta tags -->
<!-- add mocha css, to show results -->
<link rel="stylesheet" href="">
<!-- add mocha framework code -->
<script src=""></script>
mocha.setup('bdd'); // minimal setup
<!-- add chai -->
<script src=""></script>
// chai has a lot of stuff, let's make assert global
let assert = chai.assert;
<!-- Required meta tags for Bootstrap -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href=""
......@@ -10,12 +24,24 @@
<div class="alert alert-primary" role="alert">
Excercises of week 1, Tapio Mäntysalo, 28.3.2020, FS2
<div class="alert alert-primary" role="alert">Excercises of week 1, Tapio Mäntysalo, 28.3.2020, FS2</div>
<div class="mx-auto" style="width: 200px;">
<div class="dropdown">
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Choose action</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton" id="dropdown-main">
<a class="dropdown-item" href="#" id="dropdown-example">Example</a>
<a class="dropdown-item" href="#" id="dropdown-task-1">Task 1</a>
<a class="dropdown-item" href="#" id="dropdown-task-2">Task 2</a>
<a class="dropdown-item" href="#" id="dropdown-task-3">Task 3</a>
<!-- Task 3 -->
<div class="container-md">
<div class="container-md task-container" id="task-3">
<div class="jumbotron">
<h1 class="display-4">Task 3</h1>
<p class="lead">Loops and functions</p>
......@@ -88,7 +114,7 @@
<!-- Task 2 -->
<div class="container-md">
<div class="container-md task-container" id="task-2">
<div class="jumbotron">
<h1 class="display-4">Task 2</h1>
<p class="lead">Loops</p>
......@@ -118,7 +144,7 @@
<!-- Task 1 -->
<div class="container-md">
<div class="container-md task-container" id="task-1">
<div class="jumbotron">
<h1 class="display-4">Task 1</h1>
<p class="lead">Conditional statements</p>
......@@ -145,7 +171,7 @@
<!-- Example -->
<div class="container-md">
<div class="container-md task-container" id="example">
<div class="jumbotron">
<h1 class="display-4">Example</h1>
<p class="lead">This is the example provided.</p>
......@@ -191,6 +217,27 @@
$(".dropdown-item").click(function () {
var selection = $(this).attr("id");
switch (selection) {
case "dropdown-example":
case "dropdown-task-1":
case "dropdown-task-2":
case "dropdown-task-3":
<script src="task3.js"></script>
<script src="task2.js"></script>
<script src="task1.js"></script>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment