Difficulty Including Datatables in my HTML...

Difficulty Including Datatables in my HTML...

jjenkovjjenkov Posts: 1Questions: 0Answers: 0
edited June 2011 in General
Hi,

I've looked at Datatables.net, and it looks like exactly what I need for my current application. Easy to use, lots of features etc.

However, when I try to include the Datatables javascript + CSS files, create an HTML table, and try to include some of the examples from the Examples page, the data table I get out of it, is broken. It doesn't look like the examples I've copied the code from.

So here is my question:

Is there a page in the documentation that describes how to include Datatables in your HTML? I mean,


1) What JQuery files / versions to include? (e.g. is JQuery UI needed, or just JQuery?)

2) What Datatables Javascript files to include?

3) What CSS classes does Datatables use, and for what purpose?

4) Must my HTML body tag have a specific class set, like it has in the examples?

5) etc.


Any help you be greatly appreciated.

- JJenkov

Replies

  • allanallan Posts: 63,214Questions: 1Answers: 10,415 Site admin
    > 1) What JQuery files / versions to include? (e.g. is JQuery UI needed, or just JQuery?)

    Just jQuery. 1.4+ is supported (although 1.3 will likely work as well). jQuery UI is not required.

    > 2) What Datatables Javascript files to include?

    Just jquery.dataTables.js (or the min file).

    > 3) What CSS classes does Datatables use, and for what purpose?

    http://datatables.net/styling/ . There are also demo stylesheets in the distribution package.

    > 4) Must my HTML body tag have a specific class set, like it has in the examples?

    No :-)

    This is an example showing how to get DataTables up and running: http://datatables.net/examples/basic_init/zero_config.html

    These are the requirements: http://datatables.net/usage/#prerequisites

    Allan
This discussion has been closed.