Displaying 1 result from an estimated 1 matches for "no_1".
Did you mean:
n_1
2006 Apr 05
0
each_with_styles, for adding CSS classes
...nd will be a string containing
the list of relevant classes (as given by the hash).
Hope it comes in helpful!
~Mark Josef
EXAMPLE:
array = [''hello'', ''happy'', ''birthday'']
styles = { :all => ''every'', :first => ''no_1'', :odd => ''strange'' }
array.each_with_styles(styles) do |item, style|
puts "<div class=''#{style}''>
puts item
puts "</div>"
puts ""
end
WILL RETURN:
<div class=''every no_1 strange''>...