About "Include these two files"

About "Include these two files"

HaleemHaleem Posts: 2Questions: 0Answers: 0

Dear Datatables team,
iI seems that in reality we have to include three files instead of two, other wise our table will not render correctly
In fact, the "https://code.jquery.com/jquery-3.5.1.js" is a must, isn't it ?
Best regards.

Replies

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

    Yep, DataTables is a jQuery extension, so you need to include jQuery, or jQuery slim,

    Colin

  • kthorngrenkthorngren Posts: 21,344Questions: 26Answers: 4,954

    See the installation docs for the requirements.

    Kevin

  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin

    Its a fair point. The landing page suggests that you could have a plain HTML page, add those two files and then DataTables will work. That isn't the full story though - since as you rightly point out @Haleem, jQuery is needed as well.

    I could update it so that jQuery + DataTables is downloaded from our CDN, but if you already have jQuery on your page, it is going to mess things up.

    Indeed, that little landing page is becoming increasingly obsolete with the prevalence of npm etc. It really needs a proper update I think. I'm just not quite sure what yet...

    Allan

  • HaleemHaleem Posts: 2Questions: 0Answers: 0

    fair enough @allan and thank you all for the feedback

Sign In or Register to comment.