/ Published in: Ruby
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
# Used to alternate row colors in a table def alt( s = '', s2 = '2' ) @alt_state = true if @alt_state.nil? @alt_state = !@alt_state @alt_state ? s2 : s end