Hallo,
verwende zur Darstellung von Daten jQuery DataTables, sind echt super, kann ich nur weiterempfehlen, habe nur ein kleines Problem.
<script type="text/javascript">
var table = $("#myTable");
table.DataTable({
"aaSorting": [7, 'desc'],
aLengthMenu: [[10, 25, 50, 100, -1],[10, 25, 50, 100, "All"]],
"iDisplayLength": 100,
});
</script>
Das ist mein Code, und ich schaffe es einfach nicht form-control zu dem Input bzw. select tag hinzuzufügen. Nach langem suchen frage ich jetzt lieber mal nach^^.
$(<element>).addClass('form-control')
oder was ist die Frage?
Sehe hier weder select noch input-Felder und was DataTable macht ist nicht ersichtlich.
- performance is a feature -
Microsoft MVP - @Website - @AzureStuttgart - github.com/BenjaminAbt - Sustainable Code
ja das war die Frage, haber es jetzt so gelöst 😃
var table = $("#myTable");
table.DataTable({
initComplete: function(){
$('div.dataTables_filter').find('input[type]').addClass("form-control")
$('div.dataTables_length').find('select').addClass("form-control")
...