[Solved] $(document).ready functions are not working with server-side processing data

[Solved] $(document).ready functions are not working with server-side processing data

franquisfranquis Posts: 7Questions: 0Answers: 0
edited December 2010 in General
Hi everyone!
I'm a newbee with jQuery and I'm starting using this amazing plugin with server-side processing data:

Before, i had a static table and some functions:
[code]
$(document).ready(function() {
$(".myClass").click(function(){ myFunction });
$(".myClass").tipsy();
});
[/code]
But now, as I'm using server-side processing, it doesn't work anymore, when the JSON data returned by the processing page is something like that:
[code]
{ "sEcho": 1, "iTotalRecords": 1, "iTotalDisplayRecords": 1, "aaData": [ ["myLink"]] }
[/code]
How can I fix that?

Thanks!

Replies

  • franquisfranquis Posts: 7Questions: 0Answers: 0
    Well, I found how to fix that!

    [code]
    function table_update(){
    $(".myClass").click(function(){ myFunction });
    $(".myClass").tipsy();
    ...
    }

    var oTable = $('#table_erreurs').dataTable({
    "bJQueryUI": true,
    "bProcessing": true,
    "bServerSide": true,
    "sAjaxSource": "fn/tab_processor.php",
    "fnDrawCallback": function() {tab_change();}
    [/code]
This discussion has been closed.