How come I am unable to utilize the bootstrap editable table in this manner?
<table id="addElements" data-height="299">
<thead>
<tr>
<th data-field="id" data-align="right">Item ID</th>
<th data-field="element" data-align="center">Element</th>
<th data-field="weight" data-align="">Težina</th>
<th data-field="default_thickness" data-align="">Debljina</th>
</tr>
</thead>
</table>
//store data in a JavaScript variable and populate the table
var elementData = [{
"id": "1",
"element": "c",
"weight": "20",
"default_thickness": "6"
}, {
"id": "2",
"element": "k",
"weight": "21",
"default_thickness": "2"
}, {
"id": "3",
"element": "p",
"weight": "18",
"default_thickness": "2"
}];
$(function () {
$('#addElements').bootstrapTable({
data: elementData
});
})
$.fn.editable.defaults.mode = 'inline';
$('td').editable({
url: '/post',
type: 'text',
pk: 1,
name: 'parket',
title: 'Enter username'
});
In this fiddle https://jsfiddle.net/aleksacavic/03agu1ex/1/ it works, when clicked, table cells are in edit mode. But identical code on my site is not working? What am i missing? As I can see, on my side, when clicked, cells are not allowed to change class, only table header gets highlighted, additional element (input field) not being created. Thanks