【週刊ドットインストール】 Figma入門を制作中、256timesの新クラスを企画中
$(function() { 'use strict'; // update $('#todos').on('click', '.update_todo', function() { // idを取得 var id = $(this).parents('li').data('id'); //ajax処理 $.post('_ajax.php', { id: id, mode: 'update' }, function(res) { }) }); });