jQueryのTableditというプラグインを使っているのですがAjax通信の仕方がわからず作業が止まっています…
もしわかる方いらっしゃればご教授のほどよろしくお願いします。
jQuery
1$('#hoge_tb').Tabledit({ 2 deleteButton: false, 3 url: '/hoge/update', 4 editmethod: 'post', 5 debug: true, 6 7 columns: { 8 identifier: [0, 'id'], 9 editable: [[0, 'hoge1'],[1, 'hoge2']] 10 }, 11 buttons: { 12 edit: { 13 class: 'btn btn-sm btn-success', 14 html: '<i class="fa fa-fw fa-edit mr-1"></i> 編集', 15 action: 'edit' 16 }, 17 save: { 18 class: 'btn btn-sm btn-primary', 19 html: '<i class="fa fa-check mr-1"></i>保存', 20 action: 'save' 21 }, 22 restore: { 23 class: 'btn btn-sm btn-warning', 24 html: 'Restore', 25 action: 'restore' 26 }, 27 confirm: { 28 class: 'btn btn-sm btn-danger', 29 html: 'Confirm' 30 } 31 } 32 });$('#hoge_tb').Tabledit({ 33 deleteButton: false, 34 url: '/hoge/update', 35 editmethod: 'post', 36 debug: true, 37 38 columns: { 39 identifier: [0, 'id'], 40 editable: [[0, 'hoge1'],[1, 'hoge2']] 41 }, 42 buttons: { 43 edit: { 44 class: 'btn btn-sm btn-success', 45 html: '<i class="fa fa-fw fa-edit mr-1"></i> 編集', 46 action: 'edit' 47 }, 48 save: { 49 class: 'btn btn-sm btn-primary', 50 html: '<i class="fa fa-check mr-1"></i>保存', 51 action: 'save' 52 }, 53 restore: { 54 class: 'btn btn-sm btn-warning', 55 html: 'Restore', 56 action: 'restore' 57 }, 58 confirm: { 59 class: 'btn btn-sm btn-danger', 60 html: 'Confirm' 61 } 62 } 63 }); 64
HTML5
1<div class="table-responsive"> 2 3 <table id="hoge_tb" class="table table-bordered table-hover" 4 style="width: 100%"> 5 <thead> 6 7 <tr class="table-secondary text-nowrap"> 8 <th colspan="2" class="text-center">名前</th> 9 10 </tr> 11 12 <tr class="text-nowrap"> 13 14 <th></th> 15 16 17 <th>テスト姓</th> 18 <th>テスト名</th> 19 20 21 22 23 24 </tr> 25 26 </thead> 27 <tbody> 28 29 <tr class="text-nowrap"> 30 31 <td>てすと</td> 32 <td>てすと</td> 33 34 35 </tr> 36 37 </tbody> 38 </table> 39 40 </div> 41
回答1件
あなたの回答
tips
プレビュー