Last active
December 31, 2015 05:18
-
-
Save darkoverlordofdata/7939477 to your computer and use it in GitHub Desktop.
jQuery plugin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# do syntax was made for jQuery... | |
# | |
do ($ = jQuery, window, document) -> | |
_defaults = | |
color: "#556b2f" | |
backgroundColor: "white" | |
# | |
# $.fn.plugin is a shortcut for | |
$::plugin = ($options = {}) -> | |
$options = $.extend(_defaults, $options) | |
@css | |
color: $options.color | |
backgroundColor: $options.backgroundColor | |
@ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment