Quantcast
Channel: Free community support — DataTables forums
Viewing all articles
Browse latest Browse all 35271

[solved] Any clue on why I can't get a DataTables API instance ?

$
0
0

Ok, hello everybody.

That made four days that I'm on a problem that drives me crazy. As a non developper, I suspect the answer may be simple but I could't find a solution : I can't access to the DataTable API and I need it to use the column multi filter method as shown in the examples section > http://www.datatables.net/examples/api/multi_filter_select.html .

Here is the context :
- first, url : http://ecofilae.effetgraphique.com/references/ ;
It's a wordpress dev site inside a multisite install, language locale is french.

for testing and sake of the simplicity purposes of test case, the DataTables script part is inserted inside the header.
But I tested this before, correctly inserted through the function.php file of the custom theme I use, using wp_register_script and so on.

Using Firebug, I can see that files' HTTP calls and all seems to be OK. jQuery is loaded before my script, then my script is loaded.
I can use dataTables() (yes, and get the jQuery object), all is working.

But as soon as I try to use a .DataTable() on my table in my script, I get an error.
The API seems to be un-available. (I get a "DataTables is not a function" from the FF console).

If I try to use a simple $(document).ready(); to insert my script, even the dataTable(); code isn't working.

In fours days, i tried many methods in a long and painfull process of trials and errors and can't found a correct one.
Now I'm over. If anyone here passing by has a solution, I would be relieved.

And oh, I've just forgot, using a wordpress DataTables plugin is not an option : since I need to format a custom PHP table inside a custom template and then use DataTables() on it. (yeah, i tried this too, it doesn't work either).

Thanks in advance to anyone who could help.


Viewing all articles
Browse latest Browse all 35271

Trending Articles