no_freedom no_freedom - 1 year ago 136
Javascript Question

Want to show loader gif in datatables

I'm using datatables. My code is working fine. Now I want to add a loader image(gif). I don't know how to add this. Here is my datatable script so far.

$(document).ready(function() {
oTable = $('#example').dataTable({
"bJQueryUI": true,
"sPaginationType": "full_numbers"
} );

here is my loader

<div id="loader">
<img src="ajaxloader.gif">

anu anu
Answer Source

If you want to replace the 'Processing...' string with an image as you mentioned in the comment you need to take a look here

$('#example').dataTable( {
    oLanguage: {
        sProcessing: "<img src='loading.gif'>"
    processing : true
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download