Editable data attributes for Bootstrap Table
by André Albson
HTML
<link rel="stylesheet" href="https://rawgit.com/wenzhixin/bootstrap-table/master/src/bootstrap-table.css">
<script src="https://rawgit.com/wenzhixin/bootstrap-table/master/src/bootstrap-table.js"></script>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/x-editable/1.5.0/bootstrap3-editable/css/bootstrap-editable.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/x-editable/1.5.0/bootstrap3-editable/js/bootstrap-editable.min.js"></script>
<script src="https://rawgit.com/fsauter/bootstrap-table/develop/src/extensions/editable/bootstrap-table-editable.js"></script>
<table data-toggle="table"
data-editable-emptytext="This field is empty"
data-id-field="id"
data-url="/gh/get/response.json/wenzhixin/bootstrap-table/tree/master/docs/data/data2/">
<thead>
<tr>
<th data-field="id">Name</th>
<th data-field="name" data-editable="true">Name</th>
<th data-field="price" data-editable="true" data-editable-emptytext="For free.">Price</th>
</tr>
</thead>
</table>
JavaScript
$.fn.editable.defaults.mode = 'inline';