[jQuery] Re: Tablesorter plugin and zebra striping

2008-06-19 Thread Ken

This is exactly what I needed.  Thank you to all you responded.  The
information was perfect!

On Jun 18, 11:35 am, Alex <[EMAIL PROTECTED]> wrote:
> Hi Ken, luckily for us the brilliant Christian Bach created a widget
> system for Tablesorter so when you initialize your table use this
> instead $("table#sorttable").tablesorter({widgets:["zebra"]}); this
> will automatically apply a class of odd and even so you just have to
> style it!  There are some other cool things that you can do like
> disable columns and whatnot just look in the documentation 
> ^_^.http://tablesorter.com/docs/#Examples
>
> Best of luck!
>

Thanks, Ken


[jQuery] Re: Tablesorter plugin and zebra striping

2008-06-18 Thread Alex

Hi Ken, luckily for us the brilliant Christian Bach created a widget
system for Tablesorter so when you initialize your table use this
instead $("table#sorttable").tablesorter({widgets:["zebra"]}); this
will automatically apply a class of odd and even so you just have to
style it!  There are some other cool things that you can do like
disable columns and whatnot just look in the documentation ^_^.
http://tablesorter.com/docs/#Examples

Best of luck!

On Jun 18, 7:34 am, Ken <[EMAIL PROTECTED]> wrote:
> I have the following in my $(document).ready:
>
> $(document).ready(function() {
>   $(".zebra tr:not([th]):even").addClass("even");
>   $(".zebra tr:not([th]):odd").addClass("odd");
>   $("table#sorttable").tablesorter();
> )};
>
> This allows my table to sort columns by clicking on the column headers
> and works great.  What I need to be able to do, is have the zebra
> striping happen after each table sort.
>
> Is there a way to set this up?
>
> Thanks, Ken


[jQuery] Re: Tablesorter plugin and zebra striping

2008-06-18 Thread Carl Von Stetten

Ken,

Tablesorter has a zebra capability built right in through the zebra 
widget - see the docs for the tablesorter plugin.  It will automatically 
redo the striping after each sort.  You can change your code to:

$(document).ready(function() {
  $("table#sorttable").tablesorter({widgets: ['zebra']});
)};

HTH,
Carl

Ken wrote:
> I have the following in my $(document).ready:
>
> $(document).ready(function() {
>   $(".zebra tr:not([th]):even").addClass("even");
>   $(".zebra tr:not([th]):odd").addClass("odd");
>   $("table#sorttable").tablesorter();
> )};
>
> This allows my table to sort columns by clicking on the column headers
> and works great.  What I need to be able to do, is have the zebra
> striping happen after each table sort.
>
> Is there a way to set this up?
>
> Thanks, Ken
>
>
>   


[jQuery] Re: Tablesorter plugin and zebra striping

2008-06-18 Thread aquaone
Tablesorter comes with a zebra-striping widget.

$("table").tablesorter({
widgets: ['zebra']
});

stephen

On Wed, Jun 18, 2008 at 6:34 AM, Ken <[EMAIL PROTECTED]> wrote:

>
> I have the following in my $(document).ready:
>
> $(document).ready(function() {
>  $(".zebra tr:not([th]):even").addClass("even");
>  $(".zebra tr:not([th]):odd").addClass("odd");
>  $("table#sorttable").tablesorter();
> )};
>
> This allows my table to sort columns by clicking on the column headers
> and works great.  What I need to be able to do, is have the zebra
> striping happen after each table sort.
>
> Is there a way to set this up?
>
> Thanks, Ken
>