<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link data-require="bootstrap@3.3.6" data-semver="4.1.3" rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" />
<script data-require="bootstrap@3.3.6" data-semver="4.1.3" src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="style.css" />
<script data-require="jquery" data-semver="3.2.1" src="https://cdn.jsdelivr.net/npm/jquery@3.2.1/dist/jquery.min.js"></script>
<script src="script.js"></script>
</head>
<body>
<div class="col-md-12">
<h1>Simple Todo Demo!</h1>
<p>Click on row to delete newly added entry.</p>
<div data-role="content">
<ul class="list-group" id="taskListSection">
<li class="list-group-item active">Todos</li>
<li class="list-group-item ">1. Example of Existing task</li>
<li class="list-group-item ">2. Example of Existing task</li>
</ul>
<br />
<fieldset class="ui-grid-a">
<div class="ui-block-a">
<textarea placeholder="Enter task" id="taskInputText" cols="50" maxlength="128"></textarea>
</div>
<div class="ui-block-b">
<input type="button" class="btn btn-success" value="Submit" id="taskBtn" />
</div>
</fieldset>
</div>
</div>
</body>
</html>
// Add your javascript here
$(function(){
$("h1").animate({
"margin-left": "100px"
}, "slow");
$('#taskBtn').click(function() {
var newTask = $('#taskInputText').val();
if(newTask !== '') {
var count = $("#taskListSection").children().length;
$('#taskListSection').append('<li class="list-group-item deletetask bg-success">' + count + '. '+ newTask + '</li>');
$('#taskInputText').val('');
deleteTasks();
setTimeout(function(){
$('#taskListSection li.bg-success').removeClass('bg-success');
},1000);
} else {
alert('Come on, you\'re better than that');
}
});
});
function deleteTasks(){
$('.deletetask').click(function(){
$(this).remove();
});
}
/* Put your css in here */
h1 {
color: red;
}