Base nominative

« paging »: false, « info »: false, « ordering »: false, « searching »: true, « dom »: « f », « initComplete »: function () { var api = this.api(); // cacher toutes les lignes au chargement api.rows().every(function() { $(this.node()).hide(); }); // afficher seulement quand on recherche $(‘.dataTables_filter input’).on(‘input’, function () { if (this.value.trim().length > 0) { api.rows({ search: ‘applied’ }).every(function () { $(this.node()).show(); }); api.rows({ search: ‘removed’ }).every(function () { $(this.node()).hide(); }); } else { api.rows().every(function () { $(this.node()).hide(); }); } }); }

Retour en haut