首页 > 解决方案 > how to use function on Constructor, TodoList

问题描述

I want to display the results of the todolist action, from https://adminlte.io/docs/3.0/javascript/todo-list.html explain take it to use it just write it down

$('#my-todo-list').TodoList ({
   onCheck: function(checkbox) {
      console.log('check');
   },
   onUnCheck: function(checkbox) {
      console.log('un check');
   }
})

but the results of the action show nothing.

I tried to open the Constructor from the TodoList function, and displays the following functions, image

for that I tried writing

$('#my-todo-list').TodoList ({
     check: function check(item) {
          console.log('check');
     },
     unCheck: function unCheck(item) {
          console.log('unCheck');
     }
});

and still not display the results of these actions..

标签: javascriptjquery

解决方案


推荐阅读