Created
September 4, 2012 11:52
-
-
Save nastanford/3620559 to your computer and use it in GitHub Desktop.
ColdFusion - Function - Alternating Row Colors
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
// Alternating Row (classes, bgcolor, or any other alternating row useage) | |
// example: alternatingRow(TheCurrentRowCount,EvenRowText,OddRowText) | |
function alternatingRow(currentRow,evenRow,oddRow) { | |
var returnVar = IIF(currentRow Mod 2, DE(evenrow), DE(oddrow)); | |
return returnVar; | |
} | |
</cfscript> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment