Skip to content

Instantly share code, notes, and snippets.

@davidglivar
Created August 19, 2011 17:13
Show Gist options
  • Save davidglivar/1157380 to your computer and use it in GitHub Desktop.
Save davidglivar/1157380 to your computer and use it in GitHub Desktop.
jquery's plugin authoring script converted to coffeescript
(($) ->
# plugin desc
$.fn.plugin_name = (options) ->
if !this.length
return this;
this.each(
->
$this = $(this)
# plugin code here
)
return this
)(jQuery)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment