Access a plugin methods outside plugin

Access a plugin methods outside plugin

I am making plugin of some sorts, so i write:

  1. $.fn.ajajforms=function(options) 
    {

    var settings=jQuery.extend({ ... },options);
    var objs=[];
    this.each(function() { objs[objs.length]=$.ajajforms(this,settings);} )
    return objs;
    }

    $.ajajforms=function(div,settings)
    {

    $("#debug").append("ajajforms constructor()\n");
    $div=$(div);
    var g={
    settings: settings,
    add_clicked: function() {...},
    some more code....
    };
    return g;
    ...
    }

    $("#test").ajajforms();



















So, it works.
But i sometimes need to call an add_clicked(); from outsite plugin, i.e. do something like

  1. <script>$("#test").add_clicked();</script>

but this, of course, does not work.