Objectives:
- 'Hide Books' button should empty the
ul
inside of thediv
with the class ofbookshelf
- Each book
li
should have a delete button that deletes the book and removes it from theul
The only thing i added to the code was to clear out the input fields after the submit event
$.ajax({
url: url,
type: "POST",
data: {title: title, author: author, page_count: pageCount}
}).then(function(resp){
// this is nice to do :)
$('#title').val("");
$('#author').val("");
$('#page_count').val("");
})