Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
147
rated 0 times [  148] [ 1]  / answers: 1 / hits: 22431  / 12 Years ago, thu, march 29, 2012, 12:00:00
<label>Search: <input type=text aria-controls=company></label>


Using Datatables, how would i added a class to the search field input box?


More From » jquery

 Answers
2

Depending which example are you using.. if you are using the following http://datatables.net/release-datatables/examples/basic_init/zero_config.html



$(document).ready(function() {
$('#example').dataTable();
$('#example_filter input').addClass('yourclass'); // <-- add this line
} );


P.S.: If the table have more input search or you have more tables, you can refer to all the input search by using the class selector (.someClass)


[#86540] Wednesday, March 28, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
andreguym

Total Points: 125
Total Questions: 112
Total Answers: 103

Location: Wallis and Futuna
Member since Tue, Mar 30, 2021
3 Years ago
;