This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function () { | |
// Returns formatted HTML for a todo item | |
function getToDoHtml(todo) { | |
return '<li><span class="todo">' + todo + '</span><a class="edit">Edit</a><a class="remove">Remove</a></li>'; | |
} | |
// When Add button is clicked, appends the todo item from the textbox to the list of todo items | |
$('input[type="submit"].add-todo').click(function () { | |
var todo = $('input[type="text"].add-todo').val(); |
NewerOlder