SmartTables | JavaScriptSource

SmartTables

JavaScriptSource Staff Jul 27, 2007

General

Color alternate rows, sort rows and columns in ascending or descending order, all by just adding a class name. Easy to use!


  Cow Sheep Pig Dog
Name Daisy Fluffy Oinky Barky
Height 180cm 121cm 100cm 056cm
Deliciousness 85% 68% 93% 13%
Noise Moo Baa Oink Woof

Notes

There is also a tutorial available for this script.

Source Code

Paste this source code into the designated areas.

External file

Paste this code into an external JavaScript file named: smartTables.js


CSS

Paste this code into your external CSS file or in the <style> section within the HEAD section of your HTML document.


Head

Paste this code into the HEAD section of your HTML document.


Body

Paste this code into the BODY section of your HTML document


Leave a Response

(4 comments)

Your question is beyond the scope of these comments. You will need to post it over on [a href="http://www.webdeveloper.com/forum/forumdisplay.php?f=3"]the JavaScript forum[/a]. Thanks!

Lee Oct 31, 2008

I have followed all the instructions, amended all the files in the right places and checked to ensure all the files were saved and uploaded correctly, yet the effect does not work. Do you know why?

Ian Aug 10, 2008

Smart Tables are great![br /][br /]How can I make a column, say column 1, sorting in numeric order? is there a way?[br /][br /]Cheers[br /]Inz

Inz Aug 3, 2007

nice snippet for alternate row coloring...

SaravanaiPerumal Jul 30, 2007