lundi 13 juin 2016

Binding checkbox events and buttons in jQuery

I've written a basic "to-do list" application in pure JavaScript using the DOM API, based on a course over at Treehouse. The user should be able to add a task to an unordered list, edit the name of that task, check it off as being completed (or uncheck it as incomplete), or delete it altogether.

The pure JavaScript version works as it should; I'm trying to become more familiar with jQuery by using it to re-write this app, but I'm looking for help binding the checkboxes and other buttons to their respective functionalities.

JavaScript version - http://codepen.io/Llanyewe7/pen/bedjXv

jQuery version - http://codepen.io/Llanyewe7/pen/MewBNL

So far, only the "Add" button governed by the addTask() function is working as it should; my checkboxes, along with the "Edit" and "Delete" buttons, do not seem to work. The Developer Tools and JavaScript Console in Chrome do not identify any code errors; how can I effectively bind events to their "back-end" functions in jQuery to solve my problem?

Aucun commentaire:

Enregistrer un commentaire