Topic: Table sort not working.

RoopOrem free asked 4 years ago

Expected behavior I want to add table sort feature. Like this example link ( )

Actual behavior I have tried downloading the Github package and added html, css and jquery in index.html file. But getting this error that $().DataTable is not a function. ( ) after that tried the same using cdn links and getting same error. ( )

Resources (screenshots, code snippets etc.) Used these live links.

I have used below code to make this working. Please check this live link. ( )

used this javsacript to sort my table:

$(document).ready(function () { $('#dtBasicExample').DataTable(); $('.dataTables_length').addClass('bs-select'); });

RoopOrem free answered 4 years ago

Hello @Mateusz Łubianka

Thanks for your help. It works for me now.

Best Regards, Roop

Mateusz Łubianka staff commented 4 years ago

I'm glad everything works :)


Mateusz Łubianka staff answered 4 years ago

Hi @RoopOrem,

Did you include these files? <link href="css/addons/datatables.min.css" rel="stylesheet">

<script type="text/javascript" src="js/addons/datatables.min.js"></script> I tried it in MDB Free project and it works.


Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.



Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.10.1
  • Device: Windows PC
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: No
  • Provided link: Yes