Closed
Description
This is from the example page - how to write plugins:
(function ( $ ) {
$.fn.greenify = function( options ) {
// This is the easiest way to have default options.
var settings = $.extend({
"color": "#556B2F", // These are the defaults
"background-color": "white" // it should be backgroundColor
}, options );
// Greenify the collection based on the settings variable
return this.css({
"color": settings.color,
"background-color": settings.background-color // it should be settings.backgroundColor
});
};
}( jQuery ));
Metadata
Metadata
Assignees
Labels
No labels