add ejs and make some views

This commit is contained in:
s2
2016-11-10 15:01:20 +01:00
parent c86d2c73b9
commit be1711a8ab
5 changed files with 1801 additions and 34 deletions

View File

@@ -1,7 +1,11 @@
(function($) {
//events
$(document).on('submit', '#add-task-form', function(ev) {
ev.preventDefault();
var newTask = '<li class="list-group-item">' + $('#task').val() + '</li>';
$('#task-list').append(newTask);
$('#task-list').append('views/task-item.ejs', {title: $('#task').val()});
});
//initial page setup
$('.container').html('views/tasks.ejs', {});
})(jQuery)