Is it possible to have two versions of the datatable on the same page?

Is it possible to have two versions of the datatable on the same page?

kamirkamir Posts: 1Questions: 1Answers: 0

We are upgrading our web application to use 1.10.11 from 1.9.4, Is it possible to reference two versions of Datatable within the same page while are in the middle of this upgrade? How would we go about it?

Answers

  • allanallan Posts: 63,791Questions: 1Answers: 10,513 Site admin

    It is possible, but you would need two different jQuery's as well. DataTables attaches itself to the $.fn object like all jQuery plug-ins and will overwrite itself it there was a DataTable already attached.

    Having two jQuery versions on the same page is possible using their $.noConflict method - but it can get a little messy if you have other dependencies as well.

    Allan

This discussion has been closed.