Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1 | espaco | 1 | var AppTask = function () { |
| 2 | |||
| 3 | return { |
||
| 4 | |||
| 5 | //main function to initiate the module |
||
| 6 | init: function () { |
||
| 7 | $('.task-list input[type="checkbox"]').change(function() { |
||
| 8 | if ($(this).is(':checked')) { |
||
| 9 | $(this).parents('li').addClass("task-done"); |
||
| 10 | } else { |
||
| 11 | $(this).parents('li').removeClass("task-done"); |
||
| 12 | } |
||
| 13 | }); |
||
| 14 | } |
||
| 15 | |||
| 16 | }; |
||
| 17 | |||
| 18 | }(); |
||
| 19 | |||
| 20 | jQuery(document).ready(function() { |
||
| 21 | AppTask.init(); |
||
| 22 | }); |