Base initialisation class

Base initialisation class

ant87ant87 Posts: 9Questions: 0Answers: 0
edited June 2012 in General
Hi,

I have been working with your API for a couple of weeks now and I think its a great easy to use plugin.

I do have one question though, it appears that I am re-writing a lot of code to initialise the data table each time I use it when only the column information is different.

I am by no means a JavaScript expert however, I wondered if it was possible to have a base setup class or something in order to keep things dry.

Thanks

Antony

Replies

  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin
    DataTables allows you to configure its defaults, as shown in this example: http://datatables.net/release-datatables/examples/advanced_init/defaults.html . That way you need only set the defaults and then override your own defaults as and when needed.

    Allan
  • ant87ant87 Posts: 9Questions: 0Answers: 0
    edited June 2012
    Thanks Allan for you swift response and again for a great plugin. :)
This discussion has been closed.