Posts

Showing posts from February, 2018

How to debug effectively while using jQuery

Image
Common jQuery Errors and How to Resolve Them jQuery is a JavaScript framework used for client-side scripting of HTML. jQuery is used for: DOM manipulation Event Handling Animation jQuery is a popular framework with a large community of developers using it, and many plugins have been developed using it. While working using jQuery in our projects, we may encounter the following errors in common: 1) Uncaught TypeError: Cannot read property 'xxx' of undefined 2) Uncaught TypeError: 'xxx' is not a function 3) SyntaxError: syntax error 4) 404 Errors 5) Conflict errors You may also read: Datatables-plugin options Ways to handle errors in jQuery Check whether jQuery is loaded. if (typeof jQuery == 'undefined') { // jQuery IS NOT loaded, do stu...

How to initialize Datatable plugin?

Image
How to initialize Datatable plugin? Datatables.net is a sophisticated plug-in built on the jQuery JavaScript library. It provides enhanced functionality to normal HTML tables, offering built-in search, pagination, and sorting features. Download & Assets The asset files can be downloaded via the following methods: Official Website: datatables.net/download/index CDN Links: cdn.datatables.net Basic Implementation of Datatable Write the basic markup of the table with data. Add a unique ID or class name to the table. Include all the assets. As Datatables.net is built on jQuery , ensure that jQuery is loaded before the DataTables script. <table class="dashboard-table" id="example"> <thead> <tr> <th>Sites</th> <th>Followers</th> <th>R...