cfloop Example

Use cfloop to change a class on every odd row.

<cfloop from=”1″ to=”something” index=”idx”>
<li <cfif idx mod 2>class=”odd”</cfif>>

This entry was posted in coldfusion. Bookmark the permalink.

One Response to cfloop Example

  1. You can do the same thing with a query:

    <cfloop query=”myQuery”>
    <li <cfif myQuery.CurrentRow mod 2>class=”odd”</cfif>>

    </cfloop>

Leave a Reply

Your email address will not be published. Required fields are marked *

*


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>