diff --git a/static/index.js b/static/index.js index d88e63e..adf2e2d 100644 --- a/static/index.js +++ b/static/index.js @@ -18,14 +18,13 @@ function new_task() { let template = $("#task-template").html(); template = $(template); $.post("/v1/new", {api_key: API_KEY, content: input.val()}, function(data) { - // $("#new-task").before("
  • " + data.task.content + "
  • "); let input = $("input", template); input.prop("id", "task-" + data.task.id); // input.prop("onchange", "check('" + data.task.id + "')"); input.change(function() { check(data.task.id); }); - input.after(data.task.content); // NOTE not sure if will work + input.next().replace(" " + data.task.content); $("#new-task").before(template); }) .fail(function(request) {