Created
December 20, 2013 13:28
-
-
Save jarrettmeyer/8054716 to your computer and use it in GitHub Desktop.
This file contains 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
(function () { | |
var defaults = { | |
message: "Waiting...", | |
selector: ".text-selector" | |
} | |
window.thing = { | |
initialize: function (opts) { | |
this.options = $.extend(defaults, opts); | |
this.$el = $(this.options.selector); | |
return this; | |
}, | |
show: function (opts) { | |
var message = (opts && opts.message) || this.options.message; | |
this.$el.text(message); | |
// snip... | |
return this; | |
} | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment