Helping ordinary people create extraordinary websites!
$1 CPM Advertising For A Limited Time Only
HOME TUTORIALS SCRIPTS WEB HOSTING BLOG FORUM
Get Our Newsletter
Email:

Striped Tables Using JavaScript

By Paul McCarthy
2008-01-23


Introduction

JavaScript can be incredibly useful when you need to automate repetitive tasks. In this article we'll implement a simple JavaScript function that will apply alternate striped rows to a table.

We'll implement this technique using unobtrusive JavaScript.

Resources for the striped tables tutorial

Download the required resources before beginning this tutorial.

Start by opening the file 'striped-tables-example.htm'. This is the table we're going to add stripes to using JavaScript:


Rather than applying a class to every other row to assign the alternate background rows, we can let JavaScript do the work for us.

Tutorial Pages:
» Introduction
» The JavaScript
» Benefits of JavaScript striped tables


 | Bookmark
Related Tutorials:
» JavaScript Debugging Techniques with Firebug
» Opening PDFs in a New Window with JavaScript
» Essential Javascript -- A Javascript Tutorial
» Submit Forms Conditionally using JavaScript
» How to Setup a Randomising Function
» Introduction to JavaScript Tutorial

Ask A Question
characters left.