Learn Jquery Data Tables in 2 minutes

Jquery DataTables are the powerful jQuery plugin for creating tables with sorting options and search feature. It provides searching, sorting and pagination without any configuration.

In this article we will go through how to sort HTML table column using JavaScript and how to use some of the features. It is very simple as any one can implement this in any of your application.

Getting started

Data Tables can work with data from a verity of sources. It can directly work on an HTML table or we can specify data as an array while initialization. Or it can work on data coming from an Ajax source. Let’s get started with small example. In this Jquery data table tutorial we creating a simple HTML table for the sake of understanding the structure of the Data table HTML.
In the below HTML you can see, we have implemented Jquery Data table.
  <!-- data table CDN -->
  <link rel="stylesheet" type="text/css" href="http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/css/jquery.dataTables.css">
  <table id="example">
    <!-- To implement Data Table thead is required -->
    <!-- To implement Data Table tbody is required -->
  <script type="text/javascript" charset="utf8" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.2.min.js">
  <script type="text/javascript" charset="utf8" src="http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/jquery.dataTables.min.js">

  <!-- Finally we have run a function with table ID  -->
Note : To use Jquery Data Tables <thead> </thead>  and  <tbody> </tbody> is maditory.
Happy Coding 🙂

About the author


A coder who is trying to solve some problems via "Procoders", Software Engineer By Profession, WEB Enthusiast, Hobby Blogger. I love to share Tech Ideas and like to learn and explore new things and Technologies.

Add Comment

Click here to post a comment