Jeditable : no method 'editable'
Bonjour à tous,
Je viens aujourd'hui vers vous car j'ai un léger problème qui me mange pas mal de temps...
J'implémente le plug-in "DataTable" (qui pour l'instant me satisfait grandement)
mais je me retrouve confronté à un soucis depuis quelques heures maintenant : lorsque je veux implémenter l'édition en live (https://datatables.net/release-datat.../editable.html), cela ne fonctionne pas, et la console me retourne :
Citation:
Uncaught TypeError: Object [object Object] has no method 'editable' displayressource:148
(anonymous function) displayressource:148
c jquery.min.js:4
p.fireWith jquery.min.js:4
x.extend.ready jquery.min.js:4
q
J'ai pourtant bien chargé la librairie en bas (j'ai essayé en haut aussi) de ma page comme cela :
Code:
<script src="http://www.appelsiini.net/download/jquery.jeditable.js"></script>
Voici mon code javascript :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| var oTable = $('#demotable1').dataTable({
"aaSorting": [[4, "desc"]],
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"sScrollX": "100%"
});
oTable.$('td').editable('../examples_support/editable_ajax.php', {
"callback": function(sValue, y) {
var aPos = oTable.fnGetPosition(this);
oTable.fnUpdate(sValue, aPos[0], aPos[1]);
},
"submitdata": function(value, settings) {
return {
"row_id": this.parentNode.getAttribute('id'),
"column": oTable.fnGetPosition(this)[2]
};
},
"height": "14px",
"width": "100%"
}); |
Et mon code HTML :
Code:
1 2 3 4 5 6 7 8 9
| <table id="demotable1" class="display dataTable" border=1>
<thead>
<tr>
{% for col in cols %}
<th align=center > {{col[0]}}</th>
{% endfor %}
</tr>
</thead>
</table> |
J'ai déjà fait des recherches Google infructueuses..des idées?
Merci