When creating buttons / inputs and make them follow the bootstrap theme.
When creating buttons / inputs and make them follow the bootstrap theme.
Hi guys,
I have created some inputs using the following
btnExport.onclick=function(){
$('#DataTable1').dataTable().fnDestroy();
$("#DataTable1").append(
$('<tfoot/>').append( $("#DataTable1 thead tr").clone() ));
var table = $('#DataTable1').DataTable();
$('#DataTable1 tfoot th').each( function () {
var title = $(this).text();
$(this).html( '<input type="text" placeholder="Search '+title+'" />' );
} );
table.columns().every( function () {
var that = this;
$( 'input', this.footer() ).on( 'keyup change', function () {
if ( that.search() !== this.value ) {
that
.search( this.value )
.draw();
console.log(this.value);
}
} );
} );
};
How do I make the inputs use any bootstrap theme that is applied.
Cheers
Steve Warby
This discussion has been closed.
Answers
Assuming you are using Bootstrap 3, you would add the
form-control
class to your inputs. The Bootstrap documentation for that is here.Allan