Instantly share code, notes, and snippets.
do ($ = jQuery) ->
$.fn.zebraTable = (options) ->
oddColor : '#eee'
options = $.extend defaults, options
$("tr:even", @).css 'background-color', options.evenColor
$("tr:odd", @).css 'background-color', options.oddColor
You can also reduce some ( & )
@pfinkbeiner It's possible he included the parens on purpose. I know I do in all my CoffeeScript. It means less chance of misunderstanding how a function call is going to be parsed... especially if you code Python rather than Ruby or Haskell.
Also, if you ever see this, edit your comment and indent all your code by 4 spaces. That's the simplest way to indicate a code block in markdown.