Preferred Structure
Preferred Structure
![jdadwilson](https://datatables.net/forums/uploads/userpics/489/n6T4VGQGU7T42.jpg)
I am just starting a major upgrade to DT v2.0. I note in the documentation there are two methods structures...
- new DataTable('#mainTable', { // Newest structure
- oTable = $('#mainTable').DataTable( { // Presently used structure
Both seem to work but Is one preferred over the other.
jdadwilson
Answers
You can read about the two forms here. There isn't a preferred method as the result is the same. The preference is up to whether you want to use jQuery or vanilla Javascript.
Kevin