I created my own jQuery plugin in 1.4 and now I need a small amount of help.
$.etrade = function()
{
}
I need so I can build code like this
$.etrade = function()
{
this.var = 'setting';
this.subfunction = function()
{
};
}
when I take function from my plugin I need to use it like this:
$.etrade.var = '5';
$.etrade.subfunction();
Somebody know what I mean? and how I can get this problem done? 🙂
It sounds like you want to assign a plain old object to
$.etrade, not afunction. Like this:That said, I’m not sure how this qualifies as a jQuery plugin, since it looks like you’re just tacking an ad-hoc property onto
jQuery.Aside: you can’t use
varas per your example, since it’s a keyword in JavaScript.