What code changes are needed to upgrade to 1.10?

What code changes are needed to upgrade to 1.10?

quilkinquilkin Posts: 7Questions: 1Answers: 0

I have just upgraded a project to ver 1.10, and using the new API (i.e. upper-case DataTable initialization) and am struggling to find some replacement function names etc. For example I have found out to now use destroy() instead of fnDestroy(), but how do I replace, for example, settings().oPreviousSearch.sSearch()? Is there a general guide to these changes?

This question has an accepted answers - jump to answer

Answers

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395
    Answer ✓
  • quilkinquilkin Posts: 7Questions: 1Answers: 0

    Thanks. I searched for such a guide but failed to find it!
    Not quite accurate though, it says that the changes are fully backwards compatible but some names (for example fnDestroy) are not recognised in the new API.

  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin

    The changes are fully backwards compatible as fnDestroy and friends still exist, but you need to be aware of the difference between $().dataTable() and $().DataTable(). From the FAQs:

    The form $().dataTable() will return a jQuery object, while $().DataTable() returns a DataTables API instance.

    This is also noted in the 1.10 upgrade notes - linked from the download page.

    Allan

This discussion has been closed.