Preferred Structure

Preferred Structure

jdadwilsonjdadwilson Posts: 127Questions: 30Answers: 1

I am just starting a major upgrade to DT v2.0. I note in the documentation there are two methods structures...

  1. new DataTable('#mainTable', { // Newest structure
  2. oTable = $('#mainTable').DataTable( { // Presently used structure

Both seem to work but Is one preferred over the other.

jdadwilson

Answers

  • kthorngrenkthorngren Posts: 21,325Questions: 26Answers: 4,949
    edited June 28

    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

Sign In or Register to comment.