Skip to content

Instantly share code, notes, and snippets.

@Tabrizian
Created February 5, 2019 01:05
Show Gist options
  • Save Tabrizian/0c23097caa093a6322c203f3c64b5ae0 to your computer and use it in GitHub Desktop.
Save Tabrizian/0c23097caa093a6322c203f3c64b5ae0 to your computer and use it in GitHub Desktop.
body {
background-color: #c5d2ea;
margin-left: 20px;
font-family: "Helvetica Neue", Helvetica, sans-serif;
}
.student {
margin-bottom: 5px;
font-size: 150%;
}
.addButton {
height: 200%;
}
ul {
margin: 0;
padding: 0;
}
ul li {
list-style: none; /* Gets rid of list bullet points */
}
table, td, th {
border-collapse: collapse;
border: 1px solid black;
}
td, th {
min-width: 200px;
}
/* Todo js */
'use strict';
// Let's get the elements we need to add tasks
const taskForm = document.querySelector('#taskForm')
const tasks = document.querySelector('#tasks')
taskForm.addEventListener('submit', addTask)
function addTask(e) {
e.preventDefault(); // prevent default form action
}
tasks.addEventListener('click', modifyTasl)
function modifyTasl(e) {
}
function addTaskTextBox(task) {
}
function removeTaskTextBox(task) {
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>ToDo List</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<h1>ToDo List</h1>
<form id='taskForm'>
<input id='tName' type="text" name="task" placeholder="Task">
<input type="submit" value="Add Task">
</form>
<br>
<table>
<tbody id='tasks'>
<tr>
<th>
Task
</th>
<th>
Actions
</th>
</tr>
<tr>
<td>
Buy Milk
</td>
<td>
<button class='edit'>edit</button>
<button class='remove'>done</button>
</td>
</tr>
<tr>
<td>
Study
</td>
<td>
<button class='edit'>edit</button>
<button class='remove'>done</button>
</td>
</tr>
</tbody>
</table>
<script type="text/javascript" src="todo.js"></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment