I'll follow up here as well: To write a class how you like, you could do it like this:
function ajax_request(options){ // initialize this.setOptions( options ); } ajax_request.prototype = { // members and properties setOptions: function(options){ this.options = options; } }; That's the full source code - no extra library or framework required. I've never understood the fascination with have libraries to take care of this task for you, when it's so simple to do otherwise. --John On 8/11/07, Eridius <[EMAIL PROTECTED]> wrote: > > > I don't know what happen with the last post but let me try to explain myself > better in this one. > > The only way i see documenetation for building plugins is so you can add > like: > > $('#whatever').plugin(); > > Now this is all good but I want to know something different. I want to be > able to build a plug so i can do something like the $.ajax, so something > like: > > var whatever = new someplugin(); > > This way of creating a new class is one thing i love about mootools, in > mootools i can do: > > var ajax_request = new Class( > { > //class code > }); > > var ajax_request_handle = new ajax_request(); > > Is this possible n jQuery? > -- > View this message in context: > http://www.nabble.com/Creating-plugins-tf4254598s15494.html#a12108667 > Sent from the JQuery mailing list archive at Nabble.com. > >