Help! What if the input checkbox binding event is invalid?

how can I modify the checkbox event that cannot be bound?

the link contains all the current code link description

the following is the related code, ask the boss for help

//checkbox_complete
function listen_checkbox_complete(){
        $(".task-list.complete").on("click",function(){
            console.log("1",1);
        })
    }
    
  //checkbox_complete
function render_task_list(){
        var $task_list= $(".task-list");
        $task_list.html("");
        for( var i = 0 ; i < task_list.length ; iPP)
        {
             var $task = render_task_item(task_list[i],i);
             $task_list.prepend($task);
        }

        listen_task_delete();
        listen_task_detail();
        listen_checkbox_complete();
    }
    
   //checkbox_completehtml 
function render_task_item(data,index){ 
        if(!data||!index)  return;
         var list_item_item = 
                            "<div class="task-item" data-index=""  + index +"">"+
                            "<span><input class="complete" type="checkbox"></span>"+
                            "<span class="task-content">"+data.content+"</span>"+
                            "<span class="fr">"+
                              "<span class="action delete"> </span>"+
                              "<span class="action detail"> </span>"+
                            "</span>"+
                            "</div>";
        return $(list_item_item);
    }
    
Sep.25,2021

replace the bound click event with the change event.


has been solved. Haha, change the original .task-list.complete to .task-list.complete [type=checkbox]

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3b16e-2c248.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3b16e-2c248.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?