add ejs and make some views
This commit is contained in:
8
index.js
8
index.js
@@ -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)
|
Reference in New Issue
Block a user