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