Search Delay not working right

Search Delay not working right

grimswebgrimsweb Posts: 1Questions: 1Answers: 0

Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:

Hi all! I'm using the WPDataTables plugin for WordPress which includes the filter functionality of the tables. It works great. I'm trying to have a delay for a few seconds after typing in the search field or even have it not start filtering until after a few characters are entered, and not immediately. Is this possible?

I found this in the manual pages.
$('#example').DataTable( {
searchDelay: 350
});

I thought this would be exactly what I needed?

In the head of my website, I currently have this code,

jQuery(document).ready(function(){ $('#table_1').DataTable( { searchDelay: 10000 }); });

There is still no delay though on the table. I assume that's the right ID I need to use? Here is a screenshot of the table in the source code.

My questions are is the head of the page the right place to put this code? And if it is, is that the correct ID to use (#table_1). Not sure why else it wouldn't be working. Thank you for any insight you might be able to give me :)

Answers

  • kthorngrenkthorngren Posts: 20,309Questions: 26Answers: 4,770

    I'm not familiar with the WPDataTables plugin but I don't believe it uses the datatables from this site. Looks like it has its own configuration options to choose from. The best place for support of this product is with their site:
    https://wpdatatables.com/

    Kevin

  • colincolin Posts: 15,144Questions: 1Answers: 2,586

    TablePress is another WP plugin which does use DataTables, so consider that if DataTables is a requirement for you,

    Colin

This discussion has been closed.