Web Hosting Forums

Results 1 to 2 of 2

This is a discussion on Table sorting in the Hosting Talk & Chit-chat forum
I've found a JS file that allows me to sort my tables client side, however it doesn't include a way to preserve alternate color rows. ...

  1. #1
    Loyal Client
    Join Date
    Oct 2004
    Location
    USA
    Posts
    258

    Table sorting

    I've found a JS file that allows me to sort my tables client side, however it doesn't include a way to preserve alternate color rows.

    Anyone have an idea on where to pick one up that does?

  2. #2
    Not A Senior Member homoludens's Avatar
    Join Date
    Sep 2005
    Location
    H-Town
    Posts
    569
    I've no idea where to pick one up.

    I'm guessing the js sorts a table by moving around the tr elements. I'm also guessing that the alternate colouring is implemented using class names on the tr elements.

    You could add a short routine to the end of the sorting function to loop through the child elements of the table in question and apply alternating class names.

    Has this helped?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •