imjared/projects — comment on commit e94b02c386162146a7fbbd9692e3fa8d6457075b
File:  line 0
By douglasback:

Generally speaking you might be able to make this a bit more modular — think of thermometer as an object, which has properties (width, height, gradients, defaults, etc), and methods (initializing, setting the thermometer level, setting the CSS properties, etc).

As far as options go, a good pattern is to set some defaults:

```
this.defaults = {
foo: "bar",
weather: "snowy",
temperature: "28F"
}
```
and then pass an object with options that will override the defaults using the $.extend method:

```
var options = { // pass this to the plugin
weather: "sunny"
temperature: "71F"
}
```
and then in your init() method:
```
this.settings = $.extend( {}, this.defaults, options );
```