jQuery plugin Tablesorter 2.0 behaves weird

Posted by gunther-von-goetzen-sanchez on Stack Overflow See other posts from Stack Overflow or by gunther-von-goetzen-sanchez
Published on 2010-05-18T06:34:42Z Indexed on 2010/05/19 4:50 UTC
Read the original article Hit count: 348

Filed under:
|
|
|
|

I downloaded the jQuery plugin Tablesorter 2.0 from http://tablesorter.com/jquery.tablesorter.zip and modified the example-pager.html which is in tablesorter/docs directory

I wrote additional Rollover effects:


    $(function() {
        $("table")
            .tablesorter({widthFixed: true, widgets: ['zebra']})
            .tablesorterPager({container: $("#pager")});

            /** Additional code */
            $("tr").mouseover(function () { 
            $(this).addClass('over');
            });

            $("tr").mouseout(function () {  
            $(this).removeClass('over');
            });

            $("tr").click(function () { 
            $(this).addClass('marked');
            });

            $("tr").dblclick(function () {  
            $(this).removeClass('marked');
            });
            /** Additional code END  */


});

And of course modified the themes/blue/style.css file:

/* Additional code */
table.tablesorter tbody  tr.odd td {
background-color: #D1D1F0;
}

table.tablesorter tbody  tr.even td {
background-color: #EFDEDE;
}


table.tablesorter tbody  tr.over td {
background-color: #FBCA33;
}

table.tablesorter tbody  tr.marked td {
background-color: #FB4133;
}
/* Additional code END*/

All this works fine BUT when I go to further pages i.e. page 2 3 or 4 the effects are gone! I really appreciate your help

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about tablesorter