Alternate Table Row Classes in a Mako Template

/ Published in: Python
Save to your folder(s)

Copy this code and paste it in your HTML
  1. % for i, elem in enumerate(elems): \n <tr class="${i%2 and 'odd' or 'even'}"> ...

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.