Hi,
I didn't know this Builder class.
Thanks :)
Ok, that class has more features, but we need to include another file when we
will need include only prototype.js
On Monday 24 July 2006 10:43, Michael Siebert wrote:
> Hi,
> isnt this functionality already covered by script.aculo.us's Builer.node()?
> Sure thats not Prototype, but that Builder rocks IMHO.
>
> greets
>
> 2006/7/24, Claudio Gamboa <[EMAIL PROTECTED]>:
> > Hi everybody
> >
> > I wrote this new method for prototype Element.
> > I don't know why this does not exist yet.
> >
> > With this method we can create a new element and it will be returned.
> >
> > The patch is:
> >
> > ----------------------------- start ------------------------
> >
> > --- prototype.orig.js 2006-07-24 03:14:58.000000000 +0100
> > +++ prototype.js 2006-07-24 02:48:08.000000000 +0100
> > @@ -921,6 +921,15 @@
> > return $(element).style.display != 'none';
> > },
> >
> > + create: function(tagname, prop) {
> > + var elm = document.createElement(tagname);
> > + $H(prop).each(function(pair) {
> > + elm.setAttribute(pair[0], pair[1]);
> > + }
> > + );
> > + return elm;
> > + },
> > +
> > toggle: function() {
> > for (var i = 0; i < arguments.length; i++) {
> > var element = $(arguments[i]);
> > @@ -2003,4 +2012,4 @@
> >
> > return [valueL, valueT];
> > }
> > -}
> > \ No newline at end of file
> > +}
> >
> >
> > ----------------------------- end -------------------------
> >
> >
> > HowTo:
> >
> > first - check http://pdvel.com/stuff/js/createelement/
> > then - view source :)
> >
> >
> > /**
> > * Claudio Gamboa
> > * gamboa(AT_NO_SPAM)pdvel.com
> > * gamboa(AT_NOT_SPAM)co.sapo.pt
> > */
> > _______________________________________________
> > Rails-spinoffs mailing list
> > [email protected]
> > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
_______________________________________________
Rails-spinoffs mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs