Pass method parameter or option in plug-in
<pre><code>    (function ( $ ) {
        $.fn.greenify = function( options ) {
            var settings = $.extend({
                color: "#556b2f"
            }, options );

            return this.css({color: settings.color});
        };
              //TODO another function here
       if ( action === "open") {
           alert("Open!");
        }

        if ( action === "close" ) {
           alert("lose!");
        }

    }( jQuery ));

`$( "div" ).greenify({color: "orange"});`//setting of options
</code></pre>

<p>I understand the above code sets options for greenify plug in, but I also want to call the display function.</p>

<p>How can I achieve this kind of usage while setting of options still available for the greenify :</p>

<pre><code>`$( "div" ).greenify("open");` 
</code></pre>

<p>and </p>

<p><code>$( "div" ).greenify(open,{color: "orange"});</code></p>