 i am sure everyone has seen the javascript splintered striper which was shown during the 2005 24 ways to impress your friends or at least some variation of it a quick google for javascript striper came up with a ton of results well i ran into a little problem with the splintered striper and i have a solution to the problem the problem occurred if you had multiple class names on the element you are trying to stripe that may not make much sense so i guess an example will suffice striping example with problem say we start with the following markup ul class= stripe something lithis is an odd row li lithis is an even row li lithis is an odd row li lithis is an even row li lithis is an odd row li lithis is an even row li ul we are going to pretend that the class name something actually does something useful then using a javascript addloadevent function we will add the striping event to run on page load addloadevent function striper ul stripe li odd even essentially we have told the striper function to stripe all list elements li s that are descendants of unordered lists ul s with the class name of stripe then we want to apply the classes odd and even to the alternating list items here is where the problem lies since there are two classes on the unordered list the striper function does not recognize that it has a class name of stripe here is the problem in the code if parentelementclass == null currentparent classname == parentelementclass since we are just seeing if the class name of the current element is equal to the class name of stripe this is not true i have created a simple demo page with an unordered list table and paragraphs that are supposed to be striped fixing the striper really all you have to do to the javascript is to remove the line from above and replace with the lines below var pattern = new regexp parentelementclass $ if parentelementclass == null currentparent classname match pattern that takes the class name and splits is with a regular expression so now you could have fifty class names on the element and it will still work here is a little demo of the improved splintered striper im sure there is another way to do that easier so feel free to let me know if there is 