Skip to content

Commit c030372

Browse files
committed
Basic Plugin Creation: Fixed property reference in example. Fixes jquery#364.
1 parent cb55f42 commit c030372

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

page/plugins/basic-plugin-creation.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,14 +152,15 @@ As your plugins get more and more complex, it's a good idea to make your plugin
152152
153153
// This is the easiest way to have default options.
154154
var settings = $.extend({
155-
"color": "#556b2f", // These are the defaults.
156-
"background-color": "white"
155+
// These are the defaults.
156+
color: "#556b2f",
157+
backgroundColor: "white"
157158
}, options );
158159
159160
// Greenify the collection based on the settings variable.
160161
return this.css({
161-
"color": settings.color,
162-
"background-color": settings.background-color
162+
color: settings.color,
163+
backgroundColor: settings.backgroundColor
163164
});
164165
165166
};
@@ -171,7 +172,7 @@ Example usage:
171172

172173
```
173174
$( "div" ).greenify({
174-
"color": "orange"
175+
color: "orange"
175176
});
176177
```
177178

0 commit comments

Comments
 (0)