I am creating a todo list which can sort, add things to do and remove things to so. I am using Jquery. I am new to javascript and php.
(1) Upon clicking on the delete icon. It should connect with PHP mysql in the back end to delete it aswell. I tried many way to link them to delete the entire row them but all attempts were unsuccessful.
(2) Upon clicking on the check box it should always remain checked unless uncheck. I dont know how to move on with this too. I tried all the youtube and stack methods.
my database is checklist table is checklist I have checklist_id, checkbox, thingstodo, sortable_order
My code:
$("#projects").on("click", "input[type=checkbox]", function(){
$(this).closest("li").animate(function(){
$(this).checked()
});
});
$("#projects").on("click", ".ui-icon-trash", function(){
$(this).closest("li").slideUp(function(){
$(this).remove();
});
});
HTML: Each todo list row should have it's unique identifier that corresponds to your database row (checklist_id)
JS:
PHP: