Reputation: 742
I want to set the filter value of a table by using Javascript. The problem i have is that when im typing in the value in the filter field everything works correctly but when im doing something like :
$("input[type=text]").val("boe");
The "boe" is set in the field but the filter is not responding on the input. This is probably something stupid that the filter only reacts on keyup. I am using Twitter bootstrap data tables library from : Twitter boostrap datatable
Any advice is welcome! And thanks in advance!
Upvotes: 0
Views: 416
Reputation: 4530
try this after your line:
$("input[type=text]").keyup();
or even better as @h2ooooooo suggested in the comment:
$("input[type=text]").val("boe").keyup();
Upvotes: 2