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,142Questions: 1Answers: 2,586

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

    Colin

  • kthorngrenkthorngren Posts: 20,276Questions: 26Answers: 4,765

    See the installation docs for the requirements.

    Kevin

  • allanallan Posts: 61,665Questions: 1Answers: 10,096 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.