How to initialize Datatable plugin?
How to initialize Datatable plugin?
Datatables.net is a sophisticated plug in built on Jquery, JavaScript library which provides more functionality to normal HTML tables. The plug in offers search, pagination and sorting functionalities.
The assets file can be downloaded
CDN Links: https://cdn.datatables.net/
The assets file can be downloaded
- From the website,
- CDN
CDN Links: https://cdn.datatables.net/
Basic Implementation of Datatable
- Write the basic markup of the table with data
- Add a class name to the table
- Include all the assets
- As Datatables.net is built on Jquery, make sure that Jquery is downloaded before data tables
Sites | Followers | Rank | Country |
---|---|---|---|
SitePoint | 11456 | 5 | Canada |
Learnable | 123449 | 3 | USA |
Flippa | 143567 | 1 | Brazil |
$(function(){
$("#example").dataTable();
})
$("#example").dataTable();
})
You may continue this series in our next post Datatables.net Plugin options
Also, read how to manipulate DOM using jQuery
Comments
Post a Comment