How to use datatables latest version i.e. 1.10.20 with jquery latest version 3.5.0

How to use datatables latest version i.e. 1.10.20 with jquery latest version 3.5.0

Rahul_PwCRahul_PwC Posts: 9Questions: 2Answers: 0

I have downloaded datatable 1.10.20 and used datatable.min.js with jquery 3.5.0 . but it is giving .dataTable() is not a function at jquery-3.5.0.js . I tried to make a testcase with http://live.datatables.net/puputule/3/edit but there it is giving no error but in my application it is showing above error in console and datatable is not loading.

Answers

  • kthorngrenkthorngren Posts: 21,726Questions: 26Answers: 5,027

    Maybe its load order. Maybe you are loading jquery.js twice. Can you provide a link to your page so we can look?

    Kevin

  • Rahul_PwCRahul_PwC Posts: 9Questions: 2Answers: 0
    edited April 2020

    it is actually for internal users and for security perspective it requires guid authentication to access.
    actually we need jquery version to be rendered 3.5.0 on the browser. but it is showing jquery v3.3.1 if i refer jquery-3.5.0.js file before datatable.min.js.
    Then if i again refer jquery v3.5.0.js file after datatable.min.js it is rendering v3.5.0 but showing that error in the console

  • kthorngrenkthorngren Posts: 21,726Questions: 26Answers: 5,027

    You should load jquery.js only once. One of the symptoms of loading jquery.js multiple times is the error you noted.

    Kevin

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    This thread might help, it's open still, we haven't responded yet, but that user also reported issues with 3.5.0.

    Colin

  • Rahul_PwCRahul_PwC Posts: 9Questions: 2Answers: 0

    If I load once it is rendering dependent jquery version i.e. 3.3.1 . How to render the exact version what I used?

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    If you check the other thread I mentioned above, the only required change was for Editor, all the other extensions work with jQuery 3.5 without any change.

    Given that, and given you're still seeing a problem, we're going to need to see that. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

  • Rahul_PwCRahul_PwC Posts: 9Questions: 2Answers: 0

    i can give you the link, as it is an internal application you have to give your guid and i need to provide access in QA to check .
    As i am referring jQuery 3.5.0 and then datatable 1.10.20 dependent to jQuery 3.3.1 , it is referring lower version of jQuery i.e. v3.3.1 . Till this point i have no issues. But as i require jQuery 3.5.0 to render in the browser forcefully , i had to refer jQuery 3.5.0 for the second time after datatable. Then datatable is not loading and facing issues to load. In this circumstance what should i do? i have to load jQuery v3.5.0 in the browser.

  • kthorngrenkthorngren Posts: 21,726Questions: 26Answers: 5,027

    Like I said before - load jquery.js only once. Are you using Editor as described in the thread Colin linked to? Use 3.5.0 with Datatables.

    Kevin

This discussion has been closed.