How do I add a label to the on the search input field
How do I add a label to the on the search input field
Hello, How do I add an aria-label= to the <label> tag on the search input field?
thanks
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
In the
initCompleteadd this code'example' is the table id value.
HI can you show me where it goes in here thanks:
$(document).ready(function(){ $('#sessionalPapersTable').dataTable( { "paging": false, "ordering": false, "info": false } ); });Her is the link to the documentation on that option.
https://datatables.net/reference/option/initComplete
I've tried this but it doesn't work:
$(document).ready(function(){
$('#sessionalPapersTable').dataTable( {
"initComplete": function(settings, json) {
$('#sessionalPapersTable label).attr('aria-label', 'Start typing to filter results in the table below');
}
} );
});
Shot in the dark, instead of attr. Try prop
no luck. thx