I'm using x-editable plug-in for edit various elements on my App. I have one table, and there's a column that I need to make editable but for all rows.
This is my code:
JavaScript:
<script type="text/javascript">
$(document).ready(function() {
//toggle `popup` / `inline` mode
$.fn.editable.defaults.mode = 'popup';
$('#confirm_assistance').editable({
url: '/post'
});
});
</script>
HTML (only two rows of the table):
<tr class="gradeA">
<td>Pepa Loraine</td>
<td>No</td>
<td>25</td>
<td></td>
<td></td>
<td>1825€</td>
<td>250.00€</td>
<td>0.00€</td>
<td>1575.00€</td>
<td><a href="#" id="confirm_assistance" data-type="text" data-placement="right" data-title="Enter username" data-pk="22">0</a></td>
<td>2014-05-13 00:29:29</td>
<td>Ibiza Rent a Car </td>
</tr>
<tr class="gradeA">
<td>Pepa Loraine</td>
<td>No</td>
<td>25</td>
<td></td>
<td></td>
<td>1825€</td>
<td>250.00€</td>
<td>0.00€</td>
<td>1575.00€</td>
<td><a href="#" id="confirm_assistance" data-type="text" data-placement="right" data-title="Enter username" data-pk="30">0</a></td>
<td>2014-05-13 00:30:14</td>
<td>Juan Del Árbol</td>
</tr>
The first one works and i'm able to edit and send data to the server, but the next inputs doesn't work.
There's anyway to define in the same script multiple elements with the same id?