Table of Content
Remove book entry
Next we will work on the book deletion.
We begin at the model. We add a
removeBook function. It is similar to the ticker removal from the TwentyFive timer.
When the delete button is clicked, we remove the book from the model data. Then render the list again to reflect the changes.
The click event of delete button. Since the book entry is created dynamically, normal
click event doesn’t work. We need the following jQuery
click event equivalent.
delegate event is very similar to the
What’s next? We’re going to take a look at “Taking the inputs data”.