why you all guys like to create a function for each extend? You do not need
it!

On Thu, Jul 30, 2009 at 6:34 PM, Mark Gibson <jollyt...@gmail.com> wrote:

>
> You may also be interested in this then:
>
> src:
> http://github.com/jollytoad/jquery.plugins/blob/master/src/jquery.overlay.js
> doc: http://www.adaptavist.com/display/free/jQuery+Overlay
>
> It implements $.beget and a deep prototypal inheritance method,
> ideal for layered configurations or model data.
>
> - Mark
>
> 2009/7/30 Már Örlygsson <mar.orlygs...@gmail.com>:
> >
> > Hi.
> > If it hasn't been already considered (and rejected), I'd like to float
> > the idea of adding support for prototypal inheritance into the jQuery
> > core library.
> >
> > Something like this...
> >
> >    jQuery.beget = function (proto, props) {
> >        var F = function () {};
> >        F.prototype = proto;
> >        var instance = new F();
> >        return props ? $.extend(instance, props) : instance;
> >      };
> >
> > ...becomes immensely powerful - especially during plugin development
> > when allowing users to extend/override default options
> >
> >    options = $.beget($.myplugin.defaults,  options || {});
> >
> > ...and in various other common use cases - including $.fn.data()
> > assignments, etc.
> >
> >
> > I for one would love to see this feature added.
> >
> > --
> > Már
> > >
> >
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to