fnDeleteRow with jqueryui like "speed" and effects

fnDeleteRow with jqueryui like "speed" and effects

omeromer Posts: 5Questions: 0Answers: 0
edited December 2011 in Feature requests
It would be nice if my users can see the row getting deleted "slowly".
Something like fnDeleteRow(0,'slow','Highlight');

Replies

  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    edited December 2011
    http://live.datatables.net/iyacaf/2/edit#javascript,html,live

    You can attach a function (fnDeleteRow) to the jquery .hide() routine.

    In the example code below, I attach this to the "click" event - using the contextual 'this'. you can rewrite it as a named function as you need.

    [code]
    $(document).ready(function() {
    oTable = $('#example').dataTable();


    $('#example tbody').delegate( "tr", "click", function () {

    var aPos = oTable.fnGetPosition( this );

    $(this).hide("slow", function () {
    oTable.fnDeleteRow(aPos);
    } );

    } );

    } );
    [/code]
This discussion has been closed.