How to use differents versions

How to use differents versions

bobby_jacksonbobby_jackson Posts: 3Questions: 0Answers: 0
edited May 2011 in General
basically that, I need to use two versions of datatables, your been asking why... the reason is that my work inviroment includes in the header the library of datatables and I can't replace it. So I wish to have my own version (the last) plus the one that came in the header that I've to use (1.5.2).

Thanks in advanced.

Replies

  • allanallan Posts: 63,522Questions: 1Answers: 10,473 Site admin
    What you would need to do is modify the source of one of them to live in it's own "namespace" - DataTables wasn't designed to have two different versions running next to each other. The following lines would need to be changed:

    [code]
    $.fn.dataTableSettings = [];
    $.fn.dataTableExt = {};
    $.fn.dataTable = function( oInit )
    [/code]
    and then any references to fn.dataTableSettings and fn.dataTableExt.

    Allan
  • bobby_jacksonbobby_jackson Posts: 3Questions: 0Answers: 0
    Thank you so much Allan, it works perfect :D. I had some problems with 'sPaginationType': 'full_numbers', but finally I decide to use only the last library, while the other (the older one) just stay there loaded in the client :p.

    Regards.
  • allanallan Posts: 63,522Questions: 1Answers: 10,473 Site admin
    Nice one :-) Good to hear you got it working!

    Allan
This discussion has been closed.