Skip to content

Instantly share code, notes, and snippets.

@jbarnette
Created January 13, 2009 01:30
Show Gist options
  • Select an option

  • Save jbarnette/46277 to your computer and use it in GitHub Desktop.

Select an option

Save jbarnette/46277 to your computer and use it in GitHub Desktop.
on "#list" do
map :bgcolor => :color
@members.each_with_index do |m, i|
element(:bgcolor => i % 2 == 0 ? '#FFCCCC' : '#CCCCFF')
end
end
on("#name").tag.content = @member.name
on("#email").tag do |tag|
tag.content = @member.email
tag.href = "mailto:#{@member.email}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment