Prototype changed direction and doesn't make modifications
to the
native javascript types any more, so I would suspect the bug
you are
talking about went away.
It used to not play well with other API's, such as gmap.
When I asked
about it, I was told that the approach described previously
had
changed, and I found it had no more problems with API's.
Ben
On 1/5/06, Dieter Lunn <coder2000 gmail.com> wrote:
> Prototype modifies the prototype for its own purposes.
A much nicer package
> would be MochiKit.
>
>
> On 1/5/06, Ben Nolan < bnolan gmail.com> wrote:
> > Yeah - element.toggle'd be the way to do it.
> >
> > I wish prototype played nicer with arrays! Have
they fixed the:
> >
> > for (x in new Array){
> > alert("WTF! YOU INJECTED INTO
ARRAY.prototype? HOMAX!");
> > }
> >
> > bug yet? It's also freaking massive.
> >
> > Ben
> >
> >
> >
> > On 1/5/06, leeight xjtu < leeight gmail.com> wrote:
> > > Why not use Element.toggle();
> > >
> > >
> > > 2006/1/5, Ben Nolan <bnolan gmail.com>:
> > >
> > > > Nice use of prototype!
> > > >
> > > >
> > > >
> > > > On 1/5/06, Benjamin West < bewest gmail.com> wrote:
> > > > >
> > > > > might use something like (with
prototype.js):
> > > > > <button
class="hide_show" type="button"
name="comment_5">Show / Hide
> </button>
> > > > > <div class="hidden"
id="comment_5">
> > > > > Stuff here.
> > > > > </div>
> > > > >
> > > > > 'button.hide_show' : function
(element) {
> > > > > Event.observe(element,
"click", hide_show);
> > > > > }
> > > > >
> > > > > function hide_show (event) {
> > > > > var target = Event.element(event);
> > > > > var mydiv = $( target.name);
> > > > > mydiv.style.display =
(mydiv.style.display == "none" ? "block"
:
> "none");
> > > > > }
> > > > >
> > > > > On 1/3/06, Digicution <
brent.clements gmail.com> wrote:
> > > > > >
> > > > > > Some additional info. I'm
trying to replicate the following
> behavior.
> > > > > >
> > > > > > http://www.net
lobo.com/div_hiding.html
> > > > > >
> > > > > > But with the behavior library
> > > > > >
> > > > > > Thanks
> > > > > >
> > > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > >
-------------------------------------------------------
> > > 姓名:李玉北,西安交通大学软件学院
> > > QQ:76862448
> > > Email:leeight gmail.com
> > > 电话:13186139624 ^_^
> > >
-------------------------------------------------------
> >
> >
>
>
>
> --
> Dieter Lunn
> http://www.coder2000.com
|