HTML and CSS Reference
In-Depth Information
We will also provide it an id so we can easily refer to it:
<section id="taskCreation" class="not" >
The not class is defined in tasks.css, and provides a simple mechanism for hiding an ele-
ment. It is defined as follows:
.not {
Next, we will modify the link with the text “Add Task” to have an id . This will allow us to
select it more conveniently with jQuery:
<a href="#" id="btnAddTask" >Add task</a>
Finally, we will add the following code to the script section of tasks.html:
$('#btnAddTask').click(function(evt) {
This code will be explained in detail below.
The entire page should now look like this (changes are highlighted in bold):
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>Task list</title>
<link rel="stylesheet" type="text/css" href="styles/tasks.css"
media="screen" />
<script src="scripts/jquery-2.0.3.js"></script>
<span>Task list</span>
Search WWH ::

Custom Search